/* Đường dẫn: tubi-ai-pp-2/ui1/css/ui1-voice.css */
/**
 * Tubi AI PP2 - UI1 Voice Hỏi Đáp CSS
 * 
 * File: tubi-ai-pp-2/ui1/css/voice-ui.css
 * 
 * Styling cho Voice-to-Voice interface
 * - Nút xanh #0000B3
 * - Text cam #FF8C00
 * - Height: 65px
 * 
 * @package TubiAIPP2
 * @since 2.0.0
 */

/* ============================================================================
   VARIABLES
   ============================================================================ */
:root {
    --tubi-ui1-btn-bg: #0000B3;
    --tubi-ui1-btn-text: #FF8C00;
    --tubi-ui1-btn-height: 65px;
    --tubi-ui1-text-size: 20px;
    --tubi-ui1-shadow: rgba(0, 0, 0, 0.2);
    --tubi-ui1-indicator-size: 12px;
}

/* ============================================================================
   CONTAINER
   ============================================================================ */
.tubi-ui1-wrap {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ============================================================================
   BUTTON CONTAINER
   ============================================================================ */
.tubi-ui1-button-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* ============================================================================
   MAIN BUTTON
   ============================================================================ */
.tubi-ui1-main-btn {
    width: 100%;
    height: var(--tubi-ui1-btn-height);
    background: var(--tubi-ui1-btn-bg);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--tubi-ui1-shadow);
    position: relative;
    overflow: hidden;
}

.tubi-ui1-main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--tubi-ui1-shadow);
}

.tubi-ui1-main-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px var(--tubi-ui1-shadow);
}

/* Button Text */
.tubi-ui1-btn-text {
    display: block;
    color: var(--tubi-ui1-btn-text);
    font-size: var(--tubi-ui1-text-size);
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
}

/* ============================================================================
   BUTTON STATES
   ============================================================================ */

/* Ready State (Default) */
.tubi-ui1-main-btn[data-state="ready"] {
    background: var(--tubi-ui1-btn-bg);
}

/* Recording State */
.tubi-ui1-main-btn[data-state="recording"] {
    background: linear-gradient(135deg, #0000B3 0%, #0000CC 100%);
    animation: pulse-recording 2s ease-in-out infinite;
}

@keyframes pulse-recording {
    0%, 100% {
        box-shadow: 0 4px 12px var(--tubi-ui1-shadow);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 0, 179, 0.5);
    }
}

/* Processing State */
.tubi-ui1-main-btn[data-state="processing"] {
    background: linear-gradient(135deg, #0000B3 0%, #000099 100%);
    cursor: wait;
}

.tubi-ui1-main-btn[data-state="processing"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

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

/* Playing State */
.tubi-ui1-main-btn[data-state="playing"] {
    background: linear-gradient(135deg, #0000B3 0%, #0000E6 100%);
    animation: pulse-playing 1.5s ease-in-out infinite;
}

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

/* ============================================================================
   STATUS MESSAGE
   ============================================================================ */
.tubi-ui1-status {
    text-align: center;
    padding: 12px;
    margin-top: 12px;
    border-radius: 8px;
    background: #F5F5F5;
    color: #666666;
    font-size: 14px;
    font-weight: 500;
}

.tubi-ui1-status.is-error {
    background: #FEE;
    color: #C33;
}

.tubi-ui1-status.is-success {
    background: #EFE;
    color: #3C3;
}

/* ============================================================================
   VISUAL INDICATOR (5 DOTS - CỜ PHẬT GIÁO)
   Xanh → Vàng → Đỏ → Trắng → Cam
   ============================================================================ */
.tubi-ui1-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    min-height: 30px;
}

.tubi-ui1-indicator-dot {
    width: var(--tubi-ui1-indicator-size);
    height: var(--tubi-ui1-indicator-size);
    border-radius: 50%;
    animation: bounce-dots 1.4s ease-in-out infinite;
    opacity: 0.5;
}

/* 5 màu cờ Phật giáo */
.tubi-ui1-indicator-dot.dot-blue {
    background: #0000B3;
}
.tubi-ui1-indicator-dot.dot-yellow {
    background: #FFD700;
}
.tubi-ui1-indicator-dot.dot-red {
    background: #FF0000;
}
.tubi-ui1-indicator-dot.dot-white {
    background: #FFFFFF;
    border: 1px solid #CCCCCC;
}
.tubi-ui1-indicator-dot.dot-orange {
    background: #FF8C00;
}

/* Animation delay cho 5 dots */
.tubi-ui1-indicator-dot:nth-child(1) {
    animation-delay: 0s;
}
.tubi-ui1-indicator-dot:nth-child(2) {
    animation-delay: 0.15s;
}
.tubi-ui1-indicator-dot:nth-child(3) {
    animation-delay: 0.3s;
}
.tubi-ui1-indicator-dot:nth-child(4) {
    animation-delay: 0.45s;
}
.tubi-ui1-indicator-dot:nth-child(5) {
    animation-delay: 0.6s;
}

@keyframes bounce-dots {
    0%, 80%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.3);
        opacity: 1;
    }
}

/* Show indicator when recording/processing/playing */
.tubi-ui1-main-btn[data-state="recording"] ~ .tubi-ui1-indicator,
.tubi-ui1-main-btn[data-state="processing"] ~ .tubi-ui1-indicator,
.tubi-ui1-main-btn[data-state="playing"] ~ .tubi-ui1-indicator {
    display: flex;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

/* Tablet */
@media (max-width: 768px) {
    .tubi-ui1-wrap {
        padding: 16px;
    }
    
    .tubi-ui1-main-btn {
        height: 60px;
    }
    
    .tubi-ui1-btn-text {
        font-size: 18px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .tubi-ui1-wrap {
        padding: 12px;
    }
    
    .tubi-ui1-main-btn {
        height: 55px;
        border-radius: 10px;
    }
    
    .tubi-ui1-btn-text {
        font-size: 16px;
        letter-spacing: 0.5px;
    }
    
    .tubi-ui1-indicator-dot {
        width: 10px;
        height: 10px;
    }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

/* Focus state */
.tubi-ui1-main-btn:focus {
    outline: 3px solid rgba(255, 140, 0, 0.5);
    outline-offset: 3px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .tubi-ui1-main-btn,
    .tubi-ui1-indicator-dot {
        animation: none !important;
        transition: none !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .tubi-ui1-main-btn {
        border: 2px solid currentColor;
    }
    
    .tubi-ui1-btn-text {
        font-weight: 900;
    }
}

/* ============================================================================
   DISABLED STATE
   ============================================================================ */
.tubi-ui1-main-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
