/* Exact Design Color Tokens */
:root {
    --tb-bg: #AA803B;             /* Primary Topbar Gold Background */
    --tb-border: #C49B52;         /* Topbar Divider Lines */
    --tb-badge-bg: #966F2E;       /* Timer & Event Title Box Background */
    --tb-lang-bg: #C2984D;        /* English Dropdown Pill Background */
    --tb-text-white: #FFFFFF;     /* Primary Text & Digits */
    --tb-text-cream: #F1E3C8;     /* Italic Tagline & Labels */
}

/* Base Container */
.roayaty-topbar {
    width: 100%;
    background-color: var(--tb-bg);
    color: var(--tb-text-white);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    padding: 8px 24px;
    box-sizing: border-box;
    border-bottom: 1px solid var(--tb-border);
}

.roayaty-topbar-container {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Left Side: Tagline */
.roayaty-topbar-left {
    display: flex;
    align-items: center;
}

.roayaty-tagline {
    color: var(--tb-text-cream);
    font-style: italic;
    font-size: 13px;
    letter-spacing: 0.2px;
}

/* Right Side: Event Title, Countdown, Language Switcher, Close */
.roayaty-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Dynamic Event Title Indicator */
.roayaty-event-title {
    color: var(--tb-text-white);
    font-weight: 600;
    font-size: 12px;
    background-color: var(--tb-badge-bg);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

/* Timer Box */
.roayaty-timer-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.roayaty-timer-label {
    color: var(--tb-text-cream);
    font-size: 13px;
    font-weight: 500;
}

.roayaty-timer-display {
    display: flex;
    align-items: center;
    gap: 6px;
}

.roayaty-time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--tb-badge-bg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-width: 34px;
    padding: 2px 4px;
    border-radius: 4px;
}

.roayaty-time-num {
    color: var(--tb-text-white);
    font-weight: 700;
    font-size: 13px;
    line-height: 1.1;
    font-family: monospace, monospace;
}

.roayaty-time-txt {
    font-size: 8px;
    text-transform: uppercase;
    color: var(--tb-text-cream);
    letter-spacing: 0.5px;
}

/* Language Dropdown Button */
.roayaty-lang-wrapper {
    position: relative !important;
    z-index: 1050 !important; /* Forces it above header elements */
}

.roayaty-lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--tb-lang-bg);
    color: var(--tb-text-white);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.roayaty-lang-btn:hover {
    background-color: #B2883D;
}

.roayaty-chevron {
    width: 12px;
    height: 12px;
    transition: transform 0.2s ease;
}

.roayaty-lang-wrapper.active .roayaty-chevron {
    transform: rotate(180deg);
}

.roayaty-lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0; /* Align right since it's on the right side */
    margin-top: 6px;
    width: 130px;
    background-color: #8C6628;
    border: 1px solid var(--tb-border);
    border-radius: 6px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.25);
    display: none;
    flex-direction: column;
    z-index: 9999 !important;
    overflow: hidden;
}

.roayaty-lang-wrapper.active .roayaty-lang-dropdown {
    display: flex;
}

.roayaty-lang-dropdown a {
    color: var(--tb-text-white);
    padding: 8px 12px;
    text-decoration: none;
    font-size: 12px;
    transition: background 0.2s ease;
}

.roayaty-lang-dropdown a:hover {
    background-color: var(--tb-badge-bg);
}

.roayaty-close-btn {
    background: transparent;
    border: none;
    color: var(--tb-text-cream);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.roayaty-close-btn:hover {
    color: var(--tb-text-white);
    background-color: var(--tb-badge-bg);
}

.roayaty-close-btn svg {
    width: 16px;
    height: 16px;
}

.header,
.navbar,
.main-header,
.nav-section {
    overflow: visible !important; /* Prevents clipping dropdowns */
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .roayaty-topbar-container {
        flex-direction: column;
        justify-content: center;
        gap: 10px;
    }
    
    .roayaty-topbar-left,
    .roayaty-topbar-right {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 640px) {
    .roayaty-timer-label,
    .roayaty-event-title {
        display: none; /* Hide non-essential items on small mobile screens */
    }
    
    .roayaty-tagline {
        font-size: 11px;
    }
}