#recording-overlay {
    display: none !important;
}

#chat-view .mic-inline.requesting {
    pointer-events: none;
    opacity: 0.72 !important;
    transform: scale(0.96) !important;
}

#chat-view .recording-bar {
    position: relative;
    isolation: isolate;
    display: none !important;
    width: 100%;
    min-width: 0;
    min-height: 54px;
    flex: 1 1 auto;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    overflow: hidden;
    padding: 5px 5px 5px 6px;
    border: 1px solid rgba(177, 156, 255, 0.16);
    border-radius: 18px;
    background:
        linear-gradient(115deg, rgba(151, 116, 239, 0.085), transparent 42%),
        rgba(5, 8, 18, 0.5) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 8px 25px rgba(0, 0, 0, 0.16);
    -webkit-backdrop-filter: blur(28px) saturate(145%);
    backdrop-filter: blur(28px) saturate(145%);
}

#chat-view .recording-bar::after {
    content: "";
    position: absolute;
    z-index: 4;
    right: 10px;
    bottom: 0;
    left: 10px;
    height: 2px;
    transform: scaleX(var(--rec-progress, 0));
    transform-origin: left;
    border-radius: 99px;
    background: linear-gradient(90deg, #f05f78, #9b7cf6 55%, #6f82f3);
    box-shadow: 0 0 12px rgba(150, 117, 244, 0.45);
    transition: transform 100ms linear;
}

#chat-view .composer.recording-active {
    align-items: center;
    border-color: rgba(174, 151, 255, 0.18) !important;
    background:
        linear-gradient(120deg, rgba(130, 99, 221, 0.09), transparent 42%),
        rgba(8, 11, 22, 0.72) !important;
    box-shadow:
        0 16px 45px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.065) !important;
}

#chat-view .composer.recording-active .input-wrapper,
#chat-view .composer.recording-active .file-previews,
#chat-view .composer.recording-active .composer-send-wrapper {
    display: none !important;
}

#chat-view .composer.recording-active .recording-bar {
    display: grid !important;
    animation: voiceRecorderIn 280ms var(--spring, cubic-bezier(0.16, 1, 0.3, 1)) both;
}

@keyframes voiceRecorderIn {
    from { opacity: 0; transform: translateY(6px) scale(0.985); }
    to { opacity: 1; transform: none; }
}

#chat-view .rec-bar-aurora {
    position: absolute;
    z-index: -1;
    top: -48px;
    left: 16%;
    width: 42%;
    height: 92px;
    border-radius: 50%;
    background: rgba(125, 92, 225, 0.18);
    filter: blur(30px);
    pointer-events: none;
}

#chat-view .rec-bar-cancel,
#chat-view .rec-bar-pause,
#chat-view .rec-bar-send {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    margin: 0;
    padding: 0;
    border-radius: 14px;
    font: inherit;
    cursor: pointer;
    transition: transform 180ms var(--spring, ease), border-color 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

#chat-view .rec-bar-cancel,
#chat-view .rec-bar-pause {
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.045);
    color: rgba(216, 210, 229, 0.58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

#chat-view .rec-bar-cancel:hover {
    border-color: rgba(246, 99, 124, 0.24);
    background: rgba(239, 68, 88, 0.11);
    color: #ff788e;
}

#chat-view .rec-bar-pause:hover,
#chat-view .rec-bar-pause[aria-pressed="true"] {
    border-color: rgba(170, 145, 255, 0.25);
    background: rgba(142, 111, 234, 0.13);
    color: #bba9ff;
}

#chat-view .rec-bar-send {
    border: 1px solid rgba(211, 199, 255, 0.23);
    background: linear-gradient(145deg, #9a7af1, #6657da 64%, #596fdd);
    color: #fff;
    box-shadow:
        0 8px 20px rgba(75, 55, 187, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

#chat-view .rec-bar-send:hover {
    transform: translateY(-1px) scale(1.035);
    box-shadow: 0 11px 27px rgba(82, 61, 194, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

#chat-view .rec-bar-cancel:active,
#chat-view .rec-bar-pause:active,
#chat-view .rec-bar-send:active {
    transform: scale(0.91);
}

#chat-view .rec-bar-cancel:disabled,
#chat-view .rec-bar-pause:disabled,
#chat-view .rec-bar-send:disabled {
    pointer-events: none;
    opacity: 0.38;
}

#chat-view .rec-bar-session {
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(60px, 1fr);
    grid-template-rows: auto auto;
    gap: 2px 11px;
    align-items: center;
}

#chat-view .rec-bar-headline {
    display: flex;
    min-width: 84px;
    align-items: center;
    gap: 6px;
}

#chat-view .rec-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #ff5e79;
    box-shadow: 0 0 0 5px rgba(255, 75, 108, 0.09), 0 0 14px rgba(255, 75, 108, 0.44);
    animation: voiceRecordPulse 1.25s ease-in-out infinite;
}

@keyframes voiceRecordPulse {
    50% { opacity: 0.45; transform: scale(0.82); box-shadow: 0 0 0 3px rgba(255, 75, 108, 0.05); }
}

#chat-view .rec-bar-state {
    color: rgba(240, 236, 247, 0.66);
    font-size: 0.67rem;
    font-weight: 680;
}

#chat-view .rec-bar-timer {
    min-width: 37px;
    margin-left: auto;
    color: rgba(250, 248, 253, 0.92);
    font-size: 0.75rem;
    font-weight: 780;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    text-align: right;
}

#chat-view .rec-bar-wave {
    display: flex;
    min-width: 0;
    height: 24px;
    align-items: center;
    gap: clamp(2px, 0.32vw, 4px);
    overflow: hidden;
}

#chat-view .rec-bar-wave span {
    width: 3px;
    height: 18px;
    flex: 1 1 3px;
    max-width: 4px;
    transform: scaleY(var(--voice-level, 0.18));
    border-radius: 99px;
    background: linear-gradient(180deg, rgba(201, 187, 255, 0.9), rgba(126, 101, 220, 0.5));
    transform-origin: center;
    transition: transform 70ms linear, opacity 180ms ease;
}

#chat-view .rec-bar-caption {
    display: flex;
    min-width: 0;
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 12px;
    color: rgba(196, 190, 210, 0.36);
    font-size: 0.52rem;
    line-height: 1;
}

#chat-view .rec-bar-caption span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#chat-view .rec-bar-caption i {
    margin-right: 4px;
    color: rgba(177, 155, 255, 0.5);
}

#chat-view .recording-bar[data-state="paused"] .rec-dot {
    background: #ab9beb;
    box-shadow: 0 0 0 5px rgba(154, 130, 235, 0.08);
    animation: none;
}

#chat-view .recording-bar[data-state="paused"] .rec-bar-wave span {
    transform: scaleY(0.12) !important;
    opacity: 0.4;
}

#chat-view .recording-bar[data-state="paused"] .rec-bar-state {
    color: #b9a8fb;
}

#chat-view .recording-bar[data-state="sending"] .rec-dot {
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-top-color: #ad96ff;
    background: transparent;
    box-shadow: none;
    animation: voiceSendingSpin 700ms linear infinite;
}

@keyframes voiceSendingSpin {
    to { transform: rotate(360deg); }
}

[data-theme="light"] #chat-view .recording-bar {
    border-color: rgba(91, 71, 151, 0.11);
    background:
        linear-gradient(115deg, rgba(132, 104, 220, 0.08), transparent 44%),
        rgba(250, 249, 253, 0.72) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 8px 24px rgba(56, 44, 91, 0.08);
}

[data-theme="light"] #chat-view .composer.recording-active {
    background: rgba(250, 249, 253, 0.78) !important;
}

[data-theme="light"] #chat-view .rec-bar-state,
[data-theme="light"] #chat-view .rec-bar-timer {
    color: rgba(42, 35, 58, 0.76);
}

[data-theme="light"] #chat-view .rec-bar-caption {
    color: rgba(57, 47, 76, 0.42);
}

[data-theme="light"] #chat-view .rec-bar-cancel,
[data-theme="light"] #chat-view .rec-bar-pause {
    border-color: rgba(59, 43, 93, 0.08);
    background: rgba(65, 49, 97, 0.045);
    color: rgba(65, 52, 89, 0.54);
}

@media (max-width: 768px) {
    #chat-view .composer.recording-active {
        min-height: 66px;
        padding: 5px !important;
    }

    #chat-view .recording-bar {
        min-height: 54px;
        gap: 5px;
        padding-left: 5px;
        border-radius: 17px;
    }

    #chat-view .rec-bar-cancel,
    #chat-view .rec-bar-pause {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 13px;
        font-size: 0.78rem;
    }

    #chat-view .rec-bar-send {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        border-radius: 15px;
    }

    #chat-view .rec-bar-session {
        gap: 1px 7px;
    }

    #chat-view .rec-bar-headline {
        min-width: 68px;
    }

    #chat-view .rec-bar-state {
        display: none;
    }

    #chat-view .rec-bar-wave {
        gap: 2px;
    }

    #chat-view .rec-bar-wave span {
        width: 2px;
        flex-basis: 2px;
    }

    #chat-view .rec-bar-caption {
        font-size: 0.48rem;
    }

    #chat-view #rec-bar-hint {
        max-width: 122px;
    }
}

@media (max-width: 380px) {
    #chat-view .recording-bar {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
    }

    #chat-view .rec-bar-cancel,
    #chat-view .rec-bar-pause {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    #chat-view .rec-bar-wave span:nth-child(n + 17) {
        display: none;
    }

    #chat-view #rec-bar-hint {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    #chat-view .recording-bar,
    #chat-view .recording-bar *,
    #chat-view .recording-bar *::before,
    #chat-view .recording-bar *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
