/* SPDX-FileCopyrightText: 2026 BizzAppDev Systems Pvt. Ltd. */
/* SPDX-License-Identifier: AGPL-3.0-or-later */

@keyframes readiness-pulse {
    0%, 100% { transform: scale(1); opacity: 0.82; }
    50% { transform: scale(1.35); opacity: 1; }
}

@keyframes flash-pop {
    0% { transform: translateY(-4px) scale(0.98); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.recording-indicator {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 8px 0 16px;
    background: transparent;
    margin-bottom: 20px;
    box-shadow: none;
    position: relative;
    overflow: visible;
}

.recording-indicator::before {
    display: none;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.recording-indicator.visible {
    display: flex;
}

.recording-dot {
    display: none;
}

.listening-wave-side {
    position: relative;
    width: 88px;
    height: 48px;
    overflow: visible;
    z-index: 1;
}

.listening-wave-side span {
    position: absolute;
    top: 50%;
    width: 84px;
    height: 42px;
    background:
        radial-gradient(ellipse at center, transparent 34%, rgba(240, 85, 27, 0.95) 37%, rgba(240, 85, 27, 0.95) 40%, transparent 43%),
        radial-gradient(ellipse at center, transparent 51%, rgba(59, 107, 229, 0.86) 54%, rgba(59, 107, 229, 0.86) 57%, transparent 60%);
    filter:
        drop-shadow(0 0 9px rgba(240, 85, 27, 0.42))
        drop-shadow(0 0 8px rgba(59, 107, 229, 0.28));
    opacity: 0.9;
}

.listening-wave-left span {
    right: -12px;
    transform: translate(4px, -50%) scaleX(0.74);
    animation: wave-left 1.55s linear infinite;
}

.listening-wave-right span {
    left: -12px;
    transform: translate(-4px, -50%) scaleX(0.74);
    animation: wave-right 1.55s linear infinite;
}

.listening-wave-side span:nth-child(2) {
    animation-delay: -1.03s;
    opacity: 0.68;
}

.listening-wave-side span:nth-child(3) {
    animation-delay: -0.52s;
    opacity: 0.42;
}

.listening-mic {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: block;
    min-width: 58px;
    max-width: 58px;
    border-radius: 9999px;
    aspect-ratio: 1;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    clip-path: circle(50% at 50% 50%);
    -webkit-clip-path: circle(50% at 50% 50%);
    font-size: 0;
    line-height: 0;
    z-index: 2;
    background:
        radial-gradient(circle at 48% 34%, rgba(255, 176, 47, 0.34), transparent 30%),
        linear-gradient(170deg, rgba(240, 85, 27, 0.72) 8%, rgba(59, 107, 229, 0.58) 88%),
        #0a1230;
    background-clip: padding-box;
    border: 1px solid rgba(255, 122, 24, 0.34);
    box-shadow:
        inset 0 10px 20px rgba(255, 176, 47, 0.16),
        inset 0 -14px 22px rgba(5, 11, 31, 0.34),
        0 0 30px rgba(240, 85, 27, 0.22),
        0 0 28px rgba(59, 107, 229, 0.24);
    animation: mic-breathe 1.8s ease-in-out infinite;
}

.listening-mic::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    width: 14px;
    height: 23px;
    transform: translateX(-50%);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.32);
    z-index: 1;
}

.listening-mic::after {
    content: '';
    position: absolute;
    top: 26px;
    left: 50%;
    width: 27px;
    height: 17px;
    transform: translateX(-50%);
    border: 3px solid rgba(255, 255, 255, 0.95);
    border-top: 0;
    border-radius: 0 0 16px 16px;
    z-index: 1;
}

.mic-base {
    position: absolute;
    left: 50%;
    bottom: 12px;
    width: 3px;
    height: 10px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1;
}

.mic-base::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -18px;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -50%) scale(0.2);
    border-radius: 50%;
    border: 2px solid rgba(255, 176, 47, 0.58);
    box-shadow:
        0 0 14px rgba(255, 176, 47, 0.26),
        inset 0 0 12px rgba(59, 107, 229, 0.18);
    opacity: 0;
    animation: mic-inner-wave 1.35s ease-out infinite;
}

.mic-base::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 18px;
    height: 3px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
}

@keyframes wave-left {
    0% {
        transform: translate(4px, -50%) scaleX(0.74);
        opacity: 0.76;
    }
    12% {
        opacity: 0.9;
    }
    100% {
        transform: translate(-82px, -50%) scaleX(1.12);
        opacity: 0;
    }
}

@keyframes wave-right {
    0% {
        transform: translate(-4px, -50%) scaleX(0.74);
        opacity: 0.76;
    }
    12% {
        opacity: 0.9;
    }
    100% {
        transform: translate(82px, -50%) scaleX(1.12);
        opacity: 0;
    }
}

@keyframes mic-breathe {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            inset 0 10px 20px rgba(255, 176, 47, 0.16),
            inset 0 -14px 22px rgba(5, 11, 31, 0.34),
            0 0 30px rgba(240, 85, 27, 0.22),
            0 0 28px rgba(59, 107, 229, 0.24);
    }
    50% {
        transform: scale(1.04);
        box-shadow:
            inset 0 12px 22px rgba(255, 176, 47, 0.22),
            inset 0 -14px 22px rgba(5, 11, 31, 0.34),
            0 0 36px rgba(240, 85, 27, 0.32),
            0 0 34px rgba(59, 107, 229, 0.34);
    }
}

@keyframes mic-inner-wave {
    0% {
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 0;
    }
    18% {
        opacity: 0.76;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.04);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

@keyframes dot-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.live-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.live-box {
    border-radius: 12px;
    padding: 20px;
}

.live-box.transcript-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.live-box.translation-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.25) 100%);
    border: 2px solid rgba(102, 126, 234, 0.5);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3), 0 0 15px rgba(102, 126, 234, 0.15);
}

.live-box h3 {
    font-size: 1rem;
    color: var(--poly-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-content {
    min-height: 60px;
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 500;
}

.transcript-box .live-content {
    color: #e0e0e0;
}

.translation-box .live-content {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.result-box {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.1) 0%, rgba(13, 71, 161, 0.15) 100%);
    border: 2px solid rgba(30, 136, 229, 0.3);
    border-radius: 12px;
    padding: 20px;
}

.result-box h3 {
    font-size: 1rem;
    color: var(--talk-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-content {
    min-height: 60px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #e0e0e0;
}

.placeholder {
    color: #a0a0a0;
    font-style: italic;
}

.audio-container {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.1) 0%, rgba(13, 71, 161, 0.15) 100%);
    border: 2px solid rgba(30, 136, 229, 0.3);
    border-radius: 12px;
    padding: 30px 20px;
}

.audio-container h3 {
    font-size: 1rem;
    color: var(--talk-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#audio-player {
    width: 100%;
    max-width: 400px;
}

#audio-player audio {
    width: 100%;
}

footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    opacity: 0.8;
    font-size: 0.9rem;
}

footer p {
    margin: 4px 0;
}

footer a {
    color: #AAAAAA;
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}
