/* Voice to Text — professional dashboard UI */
.tool-widget:has(.vtt-app) {
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: none;
    box-shadow: none;
}

.vtt-app {
    --vtt-accent: #00aeef;
    --vtt-accent-2: #38bdf8;
    --vtt-ok: #34d399;
    --vtt-card: rgba(15, 23, 42, 0.82);
    --vtt-border: rgba(148, 163, 184, 0.16);
    --vtt-muted: #94a3b8;
    width: 100%;
}

.vtt-app [hidden] {
    display: none !important;
}

.vtt-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.vtt-shell {
    border: 1px solid var(--vtt-border);
    border-radius: 20px;
    background:
        radial-gradient(ellipse 70% 45% at 0% 0%, rgba(0, 174, 239, .14), transparent 50%),
        radial-gradient(ellipse 50% 35% at 100% 0%, rgba(52, 211, 153, .1), transparent 45%),
        linear-gradient(180deg, #111827 0%, #0b1220 100%);
    padding: 1.15rem 1.2rem 1.35rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

.vtt-trust {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .95rem;
}

.vtt-trust-item {
    display: inline-flex;
    align-items: center;
    padding: .35rem .7rem;
    border-radius: 999px;
    border: 1px solid var(--vtt-border);
    background: rgba(2, 8, 20, .45);
    font-size: .72rem;
    font-weight: 700;
    color: #e2e8f0;
}

.vtt-layout {
    display: grid;
    grid-template-columns: minmax(220px, 270px) 1fr;
    gap: 1.1rem;
    align-items: start;
}

.vtt-intro {
    position: sticky;
    top: 1rem;
    padding: 1.2rem;
    border-radius: 18px;
    border: 1px solid var(--vtt-border);
    background:
        radial-gradient(circle at top left, rgba(0, 174, 239, .18), transparent 55%),
        linear-gradient(165deg, #111827, #0b1220 70%);
}

.vtt-kicker {
    margin: 0 0 .45rem;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--vtt-accent-2);
}

.vtt-intro-title {
    margin: 0 0 .7rem;
    font-size: 1.45rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #e0f2fe, #7dd3fc 45%, #6ee7b7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.vtt-intro-text {
    margin: 0 0 1rem;
    color: var(--vtt-muted);
    font-size: .9rem;
    line-height: 1.6;
}

.vtt-cta {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    margin-bottom: 1rem;
    min-height: 46px;
    font-weight: 800;
}

.vtt-why {
    padding: 1rem;
    border-radius: 14px;
    background: rgba(0, 174, 239, .07);
    border: 1px solid rgba(0, 174, 239, .18);
}

.vtt-why h3 {
    margin: 0 0 .55rem;
    font-size: .9rem;
    color: #e2e8f0;
}

.vtt-why ul {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--vtt-muted);
    font-size: .84rem;
    line-height: 1.55;
}

.vtt-why li + li {
    margin-top: .28rem;
}

.vtt-workspace {
    min-width: 0;
}

.vtt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .15rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--vtt-border);
}

.vtt-tab {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--vtt-muted);
    font-size: .88rem;
    font-weight: 700;
    padding: .65rem .9rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.vtt-tab:hover {
    color: #e2e8f0;
}

.vtt-tab.active {
    color: var(--vtt-accent-2);
    border-bottom-color: var(--vtt-accent);
}

.vtt-panel {
    display: none;
}

.vtt-panel.active {
    display: block;
}

.vtt-main-grid {
    display: grid;
    grid-template-columns: minmax(260px, .95fr) minmax(0, 1.15fr);
    gap: 1rem;
    align-items: start;
}

.vtt-col-input,
.vtt-col-output {
    min-width: 0;
}

.vtt-card {
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid var(--vtt-border);
    background: var(--vtt-card);
}

.vtt-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

.vtt-card-head h3 {
    margin: 0;
    font-size: .92rem;
    font-weight: 800;
    color: #e2e8f0;
}

.vtt-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: .9rem;
}

.vtt-field label {
    font-size: .78rem;
    font-weight: 700;
    color: #cbd5e1;
}

.vtt-select {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--vtt-border);
    background: rgba(2, 8, 20, .55);
    color: #e2e8f0;
    padding: .55rem .7rem;
    font-size: .88rem;
    font-family: inherit;
}

.vtt-select:focus {
    outline: none;
    border-color: rgba(56, 189, 248, .55);
}

.vtt-mic-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.35rem 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid rgba(56, 189, 248, .2);
    background:
        radial-gradient(circle at 50% 35%, rgba(56, 189, 248, .2), transparent 55%),
        linear-gradient(165deg, rgba(8, 47, 73, .4), rgba(15, 23, 42, .85));
    margin-bottom: .9rem;
}

.vtt-mic-circle {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(145deg, #0284c7, #38bdf8);
    box-shadow: 0 0 0 10px rgba(56, 189, 248, .12), 0 12px 28px rgba(14, 165, 233, .35);
    display: grid;
    place-items: center;
    transition: transform .15s ease, box-shadow .2s ease, filter .15s ease;
}

.vtt-mic-circle:hover {
    filter: brightness(1.06);
    transform: scale(1.03);
}

.vtt-mic-circle.is-active {
    background: linear-gradient(145deg, #059669, #34d399);
    box-shadow: 0 0 0 12px rgba(52, 211, 153, .16), 0 12px 28px rgba(16, 185, 129, .35);
    animation: vttPulse 1.6s ease-in-out infinite;
}

@keyframes vttPulse {
    0%, 100% { box-shadow: 0 0 0 10px rgba(52, 211, 153, .12), 0 12px 28px rgba(16, 185, 129, .3); }
    50% { box-shadow: 0 0 0 18px rgba(52, 211, 153, .08), 0 12px 28px rgba(16, 185, 129, .4); }
}

.vtt-timer {
    margin-top: .9rem;
    font-size: 1.35rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: .04em;
    color: #e2e8f0;
}

.vtt-mic-hint {
    margin: .45rem 0 0;
    font-size: .84rem;
    color: var(--vtt-muted);
}

.vtt-interim {
    min-height: 1.25rem;
    margin: .55rem 0 0;
    font-size: .88rem;
    color: #a7f3d0;
    font-style: italic;
}

.vtt-pill {
    margin-top: .65rem;
    font-size: .72rem;
    font-weight: 700;
    color: #6ee7b7;
    background: rgba(16, 185, 129, .12);
    border: 1px solid rgba(52, 211, 153, .28);
    border-radius: 999px;
    padding: .28rem .65rem;
}

.vtt-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .4rem;
    margin-bottom: .9rem;
}

.vtt-mode-btn {
    appearance: none;
    border: 1px solid var(--vtt-border);
    background: rgba(30, 41, 59, .65);
    color: #cbd5e1;
    font-size: .78rem;
    font-weight: 700;
    border-radius: 999px;
    padding: .45rem .6rem;
    cursor: pointer;
}

.vtt-mode-btn.active {
    border-color: rgba(56, 189, 248, .5);
    background: rgba(14, 165, 233, .18);
    color: #7dd3fc;
}

.vtt-toggles {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.vtt-toggle {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .7rem;
    border-radius: 12px;
    border: 1px solid var(--vtt-border);
    background: rgba(2, 8, 20, .35);
    cursor: pointer;
}

.vtt-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vtt-toggle-ui {
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: rgba(71, 85, 105, .8);
    position: relative;
    flex-shrink: 0;
    transition: background .2s ease;
}

.vtt-toggle-ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: transform .2s ease;
}

.vtt-toggle input:checked + .vtt-toggle-ui {
    background: linear-gradient(90deg, #059669, #34d399);
}

.vtt-toggle input:checked + .vtt-toggle-ui::after {
    transform: translateX(18px);
}

.vtt-toggle-text {
    font-size: .82rem;
    font-weight: 700;
    color: #e2e8f0;
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    width: 100%;
}

.vtt-toggle-text em {
    font-style: normal;
    font-size: .72rem;
    color: var(--vtt-muted);
}

.vtt-toggle input:checked ~ .vtt-toggle-text em {
    color: var(--vtt-ok);
}

.vtt-advanced {
    margin-top: .9rem;
    border-top: 1px solid var(--vtt-border);
    padding-top: .75rem;
}

.vtt-advanced summary {
    cursor: pointer;
    font-size: .82rem;
    font-weight: 700;
    color: var(--vtt-accent-2);
    list-style: none;
}

.vtt-advanced summary::-webkit-details-marker {
    display: none;
}

.vtt-advanced-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-top: .75rem;
}

.vtt-advanced-body .vtt-field {
    margin-bottom: 0;
}

.vtt-note,
.vtt-help {
    margin: 0;
    font-size: .8rem;
    color: var(--vtt-muted);
    line-height: 1.5;
    grid-column: 1 / -1;
}

.vtt-help {
    margin-bottom: .85rem;
    font-size: .86rem;
}

.vtt-audio {
    width: 100%;
    margin-top: .75rem;
}

.vtt-full-btn {
    width: 100%;
    margin-top: .75rem;
    min-height: 44px;
    font-weight: 800;
}

.vtt-output-card .vtt-textarea {
    min-height: 280px;
}

.vtt-textarea {
    width: 100%;
    resize: vertical;
    border-radius: 12px;
    border: 1px solid var(--vtt-border);
    background: rgba(2, 8, 20, .55);
    color: #e2e8f0;
    padding: .85rem 1rem;
    font-size: .93rem;
    line-height: 1.55;
    font-family: inherit;
}

.vtt-textarea:focus {
    outline: none;
    border-color: rgba(56, 189, 248, .55);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, .15);
}

.vtt-output-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
}

.vtt-counts {
    font-size: .72rem;
    font-weight: 700;
    color: var(--vtt-muted);
    margin-right: .25rem;
}

.vtt-icon-btn {
    appearance: none;
    min-height: 30px;
    padding: 0 .6rem;
    border-radius: 8px;
    border: 1px solid var(--vtt-border);
    background: rgba(30, 41, 59, .7);
    color: #cbd5e1;
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
}

.vtt-icon-btn:hover {
    border-color: rgba(56, 189, 248, .45);
    color: #e0f2fe;
}

.vtt-link-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--vtt-accent-2);
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.vtt-link-btn:hover {
    color: #e0f2fe;
}

.vtt-output-foot {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .7rem;
}

.vtt-progress {
    margin-top: .85rem;
    padding: .8rem .85rem;
    border-radius: 12px;
    border: 1px solid rgba(52, 211, 153, .25);
    background: rgba(6, 78, 59, .28);
}

.vtt-progress-head {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .5rem;
    font-size: .84rem;
    color: #e2e8f0;
}

.vtt-progress-track {
    height: 9px;
    border-radius: 999px;
    background: rgba(15, 23, 41, .85);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .2);
}

.vtt-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #059669, #34d399, #6ee7b7);
    transition: width .25s ease;
}

.vtt-progress-step {
    margin: .5rem 0 0;
    font-size: .76rem;
    color: var(--vtt-muted);
}

.vtt-status {
    margin: 0;
    min-height: 1.2rem;
    font-size: .84rem;
    color: var(--vtt-muted);
    flex: 1;
}

.vtt-status.is-error { color: #fca5a5; }
.vtt-status.is-ok { color: #86efac; }

.vtt-mid-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 1rem;
    margin-top: 1rem;
}

.vtt-feature-list {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--vtt-muted);
    font-size: .84rem;
    line-height: 1.55;
}

.vtt-feature-list li + li {
    margin-top: .3rem;
}

.vtt-recent,
.vtt-history {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.vtt-history-item {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: center;
    padding: .65rem .75rem;
    border-radius: 12px;
    border: 1px solid var(--vtt-border);
    background: rgba(2, 8, 20, .35);
}

.vtt-history-item p {
    margin: 0;
    font-size: .84rem;
    color: #e2e8f0;
}

.vtt-history-item small {
    color: var(--vtt-muted);
    font-size: .72rem;
}

.vtt-empty {
    margin: 0;
    color: var(--vtt-muted);
    font-size: .86rem;
}

.vtt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1rem;
}

.vtt-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 42px;
    font-weight: 700;
}

.vtt-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 160px;
    padding: 1.25rem;
    border-radius: 14px;
    border: 1.5px dashed rgba(148, 163, 184, .35);
    background: rgba(8, 47, 73, .15);
    cursor: pointer;
    text-align: center;
    transition: border-color .2s, background .2s;
}

.vtt-drop.is-drag {
    border-color: rgba(52, 211, 153, .65);
    background: rgba(6, 78, 59, .28);
}

.vtt-drop-title {
    font-weight: 800;
    color: #e2e8f0;
}

.vtt-drop-sub {
    font-size: .8rem;
    color: var(--vtt-muted);
}

.vtt-file-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem .85rem;
    margin-top: .75rem;
    font-size: .85rem;
    color: var(--vtt-muted);
}

.vtt-file-meta strong {
    color: #e2e8f0;
}

.vtt-howto h3 {
    margin: 0 0 .75rem;
    font-size: 1rem;
}

.vtt-howto ol {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--vtt-muted);
    font-size: .9rem;
    line-height: 1.65;
}

.vtt-howto li + li {
    margin-top: .35rem;
}

.vtt-related {
    margin: 1rem 0 0;
    font-size: .84rem;
    color: var(--vtt-muted);
}

.vtt-related a {
    color: #7dd3fc;
    font-weight: 700;
}

.vtt-features {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .65rem;
    margin-top: 1.1rem;
}

.vtt-feature {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: .85rem .75rem;
    border-radius: 14px;
    border: 1px solid var(--vtt-border);
    background: rgba(15, 23, 42, .55);
}

.vtt-feature strong {
    font-size: .8rem;
    color: #e2e8f0;
}

.vtt-feature span {
    font-size: .72rem;
    color: var(--vtt-muted);
    line-height: 1.4;
}

@media (max-width: 1100px) {
    .vtt-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .vtt-layout {
        grid-template-columns: 1fr;
    }

    .vtt-intro {
        position: static;
    }

    .vtt-main-grid,
    .vtt-mid-grid,
    .vtt-advanced-body {
        grid-template-columns: 1fr;
    }

    .vtt-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .vtt-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.5rem;
        width: 100%;
    }

    .vtt-actions .btn {
        flex: none;
        width: 100%;
        min-height: 48px;
        justify-content: center;
    }
}
