/*
 * TTS hero + studio: layout/typography use Tailwind in the Blade template.
 * This file keeps behavior that is awkward in utilities: range inputs, tabs/voice JS states, selection, scrollbar.
 */

.tts-voice-row.hide-by-category {
    display: none !important;
}

/* Category tabs — pill active state (pairs with Tailwind on .tts-tab-item) */
.tts-tabs .tts-tab-item {
    border: none;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tts-tabs .tts-tab-item:hover:not(.active) {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.65);
}

.tts-tabs .tts-tab-item.active {
    color: var(--el-primary-color, #2563eb);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

/* Selected voice row — subtle tint + ring (hover comes from Tailwind) */
.tts-voice-row.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.09), rgba(99, 102, 241, 0.06)) !important;
    border-color: rgba(37, 99, 235, 0.18) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tts-voice-row.active .play-btn {
    background: rgba(37, 99, 235, 0.15);
    color: var(--el-primary-color, #2563eb);
}

.tts-add-voice {
    cursor: pointer;
    border: none;
    font: inherit;
}

/* Voice list scrollbar */
.tts-voice-list {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

.tts-voice-list::-webkit-scrollbar {
    width: 6px;
}

.tts-voice-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 6px;
}

.tts-voice-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 6px;
}

.tts-voice-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Text selection */
.tts-input-panel textarea::selection,
.tts-input-panel textarea::-moz-selection {
    background: var(--el-primary-color, #2137fc);
    color: var(--el-white-color, #fff);
}

.tts-hero ::selection,
.tts-main-card ::selection {
    background: var(--el-primary-color, #2137fc);
    color: var(--el-white-color, #fff);
}

.tts-hero ::-moz-selection,
.tts-main-card ::-moz-selection {
    background: var(--el-primary-color, #2137fc);
    color: var(--el-white-color, #fff);
}

/* Range sliders — track, fill, thumb (JS updates .tts-slider-fill width) */
.tts-slider-wrap {
    position: relative;
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: visible;
}

.tts-slider-wrap input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    background: transparent;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    pointer-events: none;
}

.tts-slider-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid var(--el-primary-color, #2563eb);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    position: relative;
    z-index: 2;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tts-slider-wrap input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.06);
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.35);
}

.tts-slider-wrap input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: 2px solid var(--el-primary-color, #2563eb);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.tts-slider-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    max-width: 100%;
    background: linear-gradient(90deg, var(--el-primary-color, #2563eb), #6366f1);
    border-radius: 999px 0 0 999px;
    pointer-events: none;
    transition: width 0.08s ease;
}

/* Trusted section */
.trusted-section {
    padding: 4rem 0;
    background: #fff;
}

.trusted-section .section-title {
    margin-bottom: 2rem;
}

/* Two-column feature cards */
.tts-feature-cards .card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    height: 100%;
}

.tts-feature-cards .card img {
    height: 220px;
    object-fit: cover;
}

.tts-feature-cards .card-body {
    padding: 1.5rem;
}

.tts-feature-cards .card-title {
    font-weight: 700;
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.tts-feature-cards .card-text {
    color: #555;
    margin-bottom: 1rem;
}

.tts-feature-cards .btn {
    font-weight: 600;
}

/* Generate voiceovers section */
.voiceovers-section {
    padding: 4rem 0;
    background: #fff;
}

.voiceovers-section .section-title {
    text-align: left;
}

.voiceovers-section .case-study-title {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.voiceovers-section .case-study-paragraph {
    font-size: 15px;
    margin-bottom: 0.5rem;
}

.video-placeholder {
    background: #1a1a2e;
    border-radius: 12px;
    aspect-ratio: 16/10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    position: relative;
}

.video-placeholder .play-overlay {
    position: absolute;
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Liked by millions - creator cards */
.creators-section {
    padding: 4rem 0;
    background: #fff;
}

.creator-card {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    transition: background 0.2s;
}

.creator-card:hover {
    background: #f9f9f9;
}

.creator-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.75rem;
}

.creator-card h6 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.creator-card p {
    font-size: 14px;
    color: #666;
    margin-bottom: 0.5rem;
}

.creator-card .play-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eee;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #333;
    margin-top: 0.5rem;
}

.creator-card .play-icon:hover {
    background: var(--el-primary-color);
    color: #fff;
}

/* Dark feature grid */
.dark-features-section {
    background: #1a1a2e;
    color: #fff;
    padding: 4rem 0;
}

.dark-features-section .section-title {
    color: #fff;
    text-align: left;
    margin-bottom: 2rem;
}

.dark-feature-card {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.5rem;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dark-feature-card h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}

.dark-feature-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    color: #ccc;
}

.dark-feature-card ul li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.dark-feature-card ul li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--el-primary-color);
}

.dark-feature-card p {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 1rem;
}

.dark-feature-card .btn {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
}

.dark-feature-card .btn:hover {
    background: #fff;
    color: #1a1a2e;
}

.dark-feature-visual {
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    height: 200px;
    width: 200px;
    margin: 0 auto;
}

.dark-feature-visual-lg {
    height: 280px;
    width: 280px;
    background: linear-gradient(135deg, #f093fb, #f5576c, #4facfe);
}

/* Deliver unique audio */
.deliver-section {
    padding: 4rem 0;
    background: #fff;
}

.deliver-section .section-title {
    text-align: left;
}

.deliver-visual-card {
    background: #0d9488;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.deliver-voices-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.deliver-voices-grid span {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: #f0f0f0;
}

.deliver-voices-grid span:nth-child(odd) {
    background: #e0f2fe;
}

.deliver-voices-grid span:nth-child(3n) {
    background: #fce7f3;
}

.deliver-voices-grid span:nth-child(5n) {
    background: #d1fae5;
}

/* Bottom two cards */
.bottom-cards .card {
    border: none;
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
}

.bottom-cards .card-light {
    background: #f5f5f5;
}

.bottom-cards .card-dark {
    background: #2d2d2d;
    color: #fff;
}

.bottom-cards .card-dark .card-title,
.bottom-cards .card-dark .card-text {
    color: #fff;
}

.bottom-cards .card-dark .card-text {
    opacity: 0.9;
}

.bottom-cards .card-dark .btn {
    background: #fff;
    color: #2d2d2d;
    font-weight: 600;
}

.bottom-cards .card-dark .btn:hover {
    background: #eee;
    color: #2d2d2d;
}

.bottom-cards .card-light .btn {
    font-weight: 600;
}

/* How it works section */
.tts-how-it-works {
    position: relative;
}

.tts-how-header {
    align-items: center;
}

.tts-how-card {
    padding: 0 0.5rem;
}

.tts-how-visual {
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 1.75rem;
}

.tts-mini-input,
.tts-mini-pill {
    min-width: 94px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid #dbe3ee;
    background: #fff;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    font-size: 16px;
    font-weight: 600;
    color: #475569;
}

.tts-mini-input-text {
    letter-spacing: 0.01em;
}

.tts-mini-caret {
    width: 2px;
    height: 18px;
    margin-left: 3px;
    border-radius: 999px;
    background: #0f172a;
    animation: ttsCaretBlink 1s step-end infinite;
}

.tts-how-visual-generate {
    gap: 12px;
}

.tts-mini-magic {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #dbe3ee;
    background: #fff;
    color: #ef4444;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(8px);
}

.tts-mini-magic i {
    font-size: 15px;
}

.tts-how-visual-export {
    gap: 10px;
}

.tts-export-icon {
    width: 54px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.tts-export-icon-audio {
    border: 2px solid #93c5fd;
    background: #fff;
    color: #3b82f6;
    transform: rotate(-8deg);
}

.tts-export-icon-video {
    background: linear-gradient(180deg, #3f3f46, #111827);
    color: #fff;
    transform: rotate(6deg);
}

.tts-export-icon i {
    font-size: 18px;
}

/* Voice styles section */
.tts-style-section {
    isolation: isolate;
}

.tts-style-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(80px);
    opacity: 0.55;
}

.tts-style-orb-one {
    top: 2.5rem;
    left: 50%;
    width: min(72vw, 42rem);
    height: 18rem;
    transform: translateX(-50%);
    background: linear-gradient(90deg, rgba(251, 146, 60, 0.22), rgba(217, 70, 239, 0.24), rgba(59, 130, 246, 0.16));
}

.tts-style-orb-two {
    right: 8%;
    bottom: 4rem;
    width: min(28vw, 18rem);
    height: 14rem;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.2), rgba(255, 255, 255, 0));
}

.tts-style-title {
    background: linear-gradient(90deg, #ff7a59 0%, #ef4444 22%, #d946ef 60%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tts-style-card {
    position: relative;
    min-height: 11.75rem;
}

.tts-style-card::after {
    content: "";
    position: absolute;
    inset: auto 1.25rem 1.2rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(226, 232, 240, 0), rgba(226, 232, 240, 0.9), rgba(226, 232, 240, 0));
}

.tts-style-player {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tts-style-play {
    flex-shrink: 0;
    background: linear-gradient(135deg, #ff7a59 0%, #d946ef 100%);
    box-shadow: 0 10px 20px -12px rgba(217, 70, 239, 0.8);
}

.tts-style-wave {
    position: relative;
    flex: 1;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    overflow: hidden;
}

.tts-style-wave::before {
    content: "";
    position: absolute;
    inset: 4px 8px;
    border-radius: 999px;
    background: repeating-linear-gradient(90deg,
            rgba(203, 213, 225, 0.95) 0,
            rgba(203, 213, 225, 0.95) 8px,
            transparent 8px,
            transparent 14px);
    opacity: 0.75;
}

.tts-style-wave-fill {
    position: absolute;
    inset: 3px auto 3px 3px;
    display: block;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 122, 89, 0.95), rgba(217, 70, 239, 0.92));
    box-shadow: 0 6px 14px -10px rgba(217, 70, 239, 0.75);
}

/* Voice use case section */
.tts-usecase-section {
    background: #fff;
}

.tts-usecase-card {
    position: relative;
    box-shadow: 0 10px 28px -24px rgba(15, 23, 42, 0.32);
}

.tts-usecase-trigger {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.tts-usecase-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #dbeafe;
}

.tts-usecase-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.tts-usecase-card:hover .tts-usecase-preview {
    transform: scale(1.04);
}

.tts-usecase-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.2));
    transition: background 0.25s ease;
}

.tts-usecase-card:hover .tts-usecase-overlay {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.28));
}

.tts-usecase-play {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 16px 28px -18px rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    transition: transform 0.25s ease, background 0.25s ease;
}

.tts-usecase-card:hover .tts-usecase-play {
    transform: scale(1.06);
    background: rgba(37, 99, 235, 0.82);
}

.tts-usecase-cta {
    border: none;
}

.tts-modal-open {
    overflow: hidden;
}

.tts-usecase-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.tts-usecase-modal.hidden {
    display: none;
}

.tts-usecase-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(4px);
}

.tts-usecase-dialog {
    position: relative;
    z-index: 1;
    width: min(1100px, 100%);
}

.tts-usecase-modal-card {
    border-radius: 24px;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    box-shadow: 0 32px 90px -32px rgba(15, 23, 42, 0.9);
}

.tts-usecase-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: background 0.2s ease;
}

.tts-usecase-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tts-usecase-modal-frame {
    background: #020617;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.15);
}

#ttsUsecaseModalVideo {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

@keyframes ttsCaretBlink {
    0%,
    50% {
        opacity: 1;
    }

    50.01%,
    100% {
        opacity: 0;
    }
}

@media (max-width: 767.98px) {
    .tts-how-header {
        max-width: 36rem;
    }

    .tts-how-card {
        padding: 0;
    }

    .tts-how-visual {
        min-height: 86px;
        margin-bottom: 1.25rem;
    }

    .tts-style-card {
        min-height: auto;
    }

    .tts-style-orb-one {
        top: 0;
        height: 14rem;
    }

    .tts-usecase-play {
        width: 58px;
        height: 58px;
    }
}