/* Đường dẫn: tubi-ai-pp-2/ui2/css/ui2-tabs.css */
/**
 * Tubi AI PP2 - UI2 Tâm Sự CSS
 * 
 * UI2: Menu tabs + 5 dots + Play bar
 * Font sizes tăng lớn cho dễ đọc
 * Toàn bộ chữ HOA
 * 
 * @package TubiAIPP2
 * @since 2.0.0
 */

/* Import Google Font - Poppins (tròn, dày, dễ đọc) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800;900&display=swap');

/* ============================================================================
   VARIABLES
   ============================================================================ */
:root {
    --tubi-ui2-tab-active: #FF0000;
    --tubi-ui2-tab-inactive: #0000B3;
    --tubi-ui2-tab-size-active: 28px;    /* Tăng từ 26px */
    --tubi-ui2-tab-size-inactive: 24px;  /* Tăng từ 22px */
    --tubi-ui2-separator: #999999;
    --tubi-ui2-separator-size: 24px;     /* Tăng từ 22px */
    --tubi-ui2-bg: #FFFFFF;
    --tubi-ui2-border: #E0E0E0;
    --tubi-ui2-shadow: rgba(0, 0, 0, 0.1);
    
    /* 5 Dots Colors */
    --tubi-ui2-dot-blue: #0000B3;
    --tubi-ui2-dot-yellow: #FFD700;
    --tubi-ui2-dot-red: #FF0000;
    --tubi-ui2-dot-white: #FFFFFF;
    --tubi-ui2-dot-orange: #FF8C00;
    
    /* Play Bar */
    --tubi-ui2-playbar-bg: #F8F9FA;
    --tubi-ui2-playbar-border: #E0E0E0;
    --tubi-ui2-playbar-text: #333333;
    --tubi-ui2-playbar-progress: #0000B3;
    --tubi-ui2-playbar-progress-bg: #E0E0E0;
}

/* ============================================================================
   CONTAINER
   ============================================================================ */
.tubi-ui2-wrap {
    width: 100%;
    max-width: 100%;
    background: var(--tubi-ui2-bg);
    border-radius: 0;
    overflow: visible;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================================================
   MENU TABS
   ============================================================================ */
.tubi-ui2-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 16px;
    border-bottom: 2px solid var(--tubi-ui2-border);
    background: linear-gradient(to bottom, #FAFAFA, #FFFFFF);
}

/* Tab Button */
.tubi-ui2-tab {
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--tubi-ui2-tab-inactive);
    font-size: var(--tubi-ui2-tab-size-inactive);
    font-weight: 700;           /* TẤT CẢ ĐỀU BOLD */
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;  /* CHỮ HOA */
    letter-spacing: 0.5px;
    text-decoration: none;      /* KHÔNG GẠCH CHÂN */
}

.tubi-ui2-tab:hover {
    color: var(--tubi-ui2-tab-active);
    transform: translateY(-1px);
    text-decoration: none;      /* KHÔNG GẠCH CHÂN KHI HOVER */
}

.tubi-ui2-tab.is-active {
    color: var(--tubi-ui2-tab-active);
    font-size: var(--tubi-ui2-tab-size-active);
    font-weight: 700;           /* TẤT CẢ ĐỀU BOLD */
    text-decoration: none;      /* KHÔNG GẠCH CHÂN KHI ACTIVE */
}

.tubi-ui2-tab:focus {
    outline: 2px solid var(--tubi-ui2-tab-active);
    outline-offset: 2px;
}

/* Tab Text */
.tubi-ui2-tab-text {
    display: inline-block;
}

/* Separator */
.tubi-ui2-separator {
    color: var(--tubi-ui2-separator);
    font-size: var(--tubi-ui2-separator-size);
    user-select: none;
    font-weight: 700;
}

/* ============================================================================
   TAB TÂM SỰ - ANIMATION ĐỔI MÀU (5 màu cờ Phật giáo)
   ============================================================================ */

/* Class để kích hoạt animation khi recording */
.tubi-ui2-tab[data-tab="tamsu"].is-animating {
    animation: buddhaFlagColors 2.5s ease-in-out infinite;
    font-weight: 800;  /* Dày hơn khi animating */
}

/* Animation đổi màu: Xanh → Vàng → Đỏ → Trắng → Cam */
@keyframes buddhaFlagColors {
    0%, 100% {
        color: #0000B3;  /* Xanh */
        text-shadow: 0 0 8px rgba(0, 0, 179, 0.5);
    }
    20% {
        color: #FFD700;  /* Vàng */
        text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    }
    40% {
        color: #FF0000;  /* Đỏ */
        text-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
    }
    60% {
        color: #FFFFFF;  /* Trắng */
        text-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
    }
    80% {
        color: #FF8C00;  /* Cam */
        text-shadow: 0 0 8px rgba(255, 140, 0, 0.5);
    }
}

/* ============================================================================
   PLAY BAR
   ============================================================================ */
.tubi-ui2-playbar {
    display: none;
    background: var(--tubi-ui2-playbar-bg);
    border-top: 1px solid var(--tubi-ui2-playbar-border);
    padding: 16px 20px;
    animation: slideDown 0.3s ease;
}

.tubi-ui2-playbar.is-visible {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Play Bar Info */
.tubi-ui2-playbar-info {
    margin-bottom: 12px;
}

.tubi-ui2-playbar-title {
    font-size: 24px;          /* Tăng từ 22px */
    font-weight: 700;
    color: var(--tubi-ui2-playbar-text);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase; /* CHỮ HOA */
    letter-spacing: 0.5px;
}

/* Progress Bar */
.tubi-ui2-playbar-progress-wrap {
    position: relative;
    height: 8px;
    background: var(--tubi-ui2-playbar-progress-bg);
    border-radius: 4px;
    margin-bottom: 8px;
    cursor: pointer;
}

.tubi-ui2-playbar-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.tubi-ui2-playbar-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--tubi-ui2-playbar-progress);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* Time Display */
.tubi-ui2-playbar-time {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: 22px;          /* Tăng từ 20px */
    font-weight: 700;         /* BOLD */
    color: #666666;
    margin-bottom: 12px;
}

.tubi-ui2-playbar-separator {
    color: #999999;
}

/* Controls */
.tubi-ui2-playbar-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.tubi-ui2-playbar-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #FFFFFF;
    color: var(--tubi-ui2-tab-inactive);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.tubi-ui2-playbar-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.tubi-ui2-playbar-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.tubi-ui2-playbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tubi-ui2-playbar-btn:focus {
    outline: 2px solid var(--tubi-ui2-tab-active);
    outline-offset: 2px;
}

/* Main Play/Pause Button */
.tubi-ui2-playbar-btn-main {
    width: 54px;
    height: 54px;
    background: var(--tubi-ui2-tab-inactive);
    color: #FFFFFF;
}

.tubi-ui2-playbar-btn-main:hover {
    background: var(--tubi-ui2-tab-active);
}

.tubi-ui2-playbar-icon {
    font-size: 20px;
    line-height: 1;
}

.tubi-ui2-playbar-btn-main .tubi-ui2-playbar-icon {
    font-size: 24px;
}

/* Volume */
.tubi-ui2-playbar-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.tubi-ui2-playbar-volume-slider {
    width: 80px;
    height: 6px;
    border-radius: 3px;
    background: var(--tubi-ui2-playbar-progress-bg);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.tubi-ui2-playbar-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--tubi-ui2-tab-inactive);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tubi-ui2-playbar-volume-slider::-webkit-slider-thumb:hover {
    background: var(--tubi-ui2-tab-active);
    transform: scale(1.2);
}

.tubi-ui2-playbar-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--tubi-ui2-tab-inactive);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.tubi-ui2-playbar-volume-slider::-moz-range-thumb:hover {
    background: var(--tubi-ui2-tab-active);
    transform: scale(1.2);
}

/* ============================================================================
   SLEEP OVERLAY (Tab 4)
   ============================================================================ */
.tubi-ui2-sleep-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}

.tubi-ui2-sleep-overlay.is-visible {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tubi-ui2-sleep-content {
    text-align: center;
    color: white;
}

.tubi-ui2-sleep-text {
    font-size: 34px;          /* Tăng từ 32px */
    font-weight: 700;         /* BOLD */
    margin-bottom: 28px;
    line-height: 1.5;
    text-transform: uppercase; /* CHỮ HOA */
    letter-spacing: 1px;
}

.tubi-ui2-sleep-close {
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 8px;
    color: white;
    font-size: 22px;           /* Tăng từ 20px */
    font-weight: 700;          /* BOLD */
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase; /* CHỮ HOA */
    letter-spacing: 0.5px;
}

.tubi-ui2-sleep-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* ============================================================================
   QUOTE OVERLAY (Tab 5)
   ============================================================================ */
.tubi-ui2-quote-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s ease;
    padding: 20px;
}

.tubi-ui2-quote-overlay.is-visible {
    display: flex;
}

.tubi-ui2-quote-content {
    max-width: 700px;
    padding: 40px;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFFFFF 100%);
    border-radius: 16px;
    border-left: 6px solid var(--tubi-ui2-tab-active);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.tubi-ui2-quote-text {
    font-size: 30px;          /* Tăng từ 28px */
    line-height: 1.7;
    color: #333333;
    font-style: italic;
    font-weight: 700;         /* BOLD */
    margin-bottom: 24px;
    /* KHÔNG uppercase vì là trích dẫn */
}

.tubi-ui2-quote-close {
    padding: 12px 24px;
    background: var(--tubi-ui2-tab-active);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 24px;          /* Tăng từ 22px */
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase; /* CHỮ HOA */
    letter-spacing: 0.5px;
}

.tubi-ui2-quote-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
    .tubi-ui2-menu {
        padding: 14px 12px;
        gap: 8px;
    }
    
    .tubi-ui2-tab {
        padding: 8px 10px;
        font-size: 24px;          /* Tăng từ 22px (+2) */
        font-weight: 700;         /* BOLD */
    }
    
    .tubi-ui2-tab.is-active {
        font-size: 28px;          /* Tăng từ 26px (+2) */
        font-weight: 700;         /* BOLD */
    }
    
    .tubi-ui2-separator {
        font-size: 24px;          /* Tăng từ 22px (+2) */
    }
    
    .tubi-ui2-playbar {
        padding: 14px 16px;
    }
    
    .tubi-ui2-playbar-title {
        font-size: 22px;          /* Tăng từ 20px */
        font-weight: 700;         /* BOLD */
    }
    
    .tubi-ui2-playbar-time {
        font-size: 20px;          /* Tăng từ 18px */
        font-weight: 700;         /* BOLD */
    }
    
    .tubi-ui2-playbar-btn {
        width: 40px;
        height: 40px;
    }
    
    .tubi-ui2-playbar-btn-main {
        width: 50px;
        height: 50px;
    }
    
    .tubi-ui2-playbar-volume-slider {
        width: 60px;
    }
}

@media (max-width: 480px) {
    .tubi-ui2-menu {
        padding: 12px 8px;
        gap: 6px;
    }
    
    .tubi-ui2-tab {
        padding: 6px 8px;
        font-size: 22px;          /* Tăng từ 20px (+2) */
        font-weight: 700;         /* BOLD */
    }
    
    .tubi-ui2-tab.is-active {
        font-size: 26px;          /* Tăng từ 24px (+2) */
        font-weight: 700;         /* BOLD */
    }
    
    .tubi-ui2-separator {
        font-size: 22px;          /* Tăng từ 20px (+2) */
    }
    
    .tubi-ui2-playbar {
        padding: 12px;
    }
    
    .tubi-ui2-playbar-title {
        font-size: 21px;          /* Tăng từ 19px */
        font-weight: 700;         /* BOLD */
    }
    
    .tubi-ui2-playbar-time {
        font-size: 19px;          /* Tăng từ 17px */
        font-weight: 700;         /* BOLD */
    }
    
    .tubi-ui2-playbar-btn {
        width: 36px;
        height: 36px;
    }
    
    .tubi-ui2-playbar-btn-main {
        width: 46px;
        height: 46px;
    }
    
    .tubi-ui2-playbar-icon {
        font-size: 18px;
    }
    
    .tubi-ui2-playbar-btn-main .tubi-ui2-playbar-icon {
        font-size: 22px;
    }
    
    .tubi-ui2-playbar-controls {
        gap: 8px;
    }
    
    .tubi-ui2-playbar-volume {
        display: none; /* Hide volume on very small screens */
    }
    
    .tubi-ui2-sleep-text {
        font-size: 30px;          /* Tăng từ 28px */
        font-weight: 700;         /* BOLD */
    }
    
    .tubi-ui2-quote-text {
        font-size: 26px;          /* Tăng từ 24px */
        font-weight: 700;         /* BOLD */
    }
}
