/* ============================================================================
 * HEADER COMPONENT STYLES
 * Navigation, branding, and page information
 * ============================================================================ */

/* ========================================
 * HEADER CONTAINER
 * Main header layout and positioning
 * ======================================== */

.header-container {
    position: absolute;
    z-index: var(--z-header);
    margin: 0;
    /* padding: 0; - Remove this to allow coordinate-based padding */
    box-sizing: border-box;
}

.math-app-header {
    justify-content: space-between;
}

.math-app-header-left {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1vw, 16px);
    width: clamp(100px, 12vw, 200px);
}

.math-app-header-center {
    flex: 1;
    text-align: center;
}

.math-app-header-right {
    width: clamp(100px, 12vw, 200px);
}

/* ========================================
 * HEADER DROPDOWN COMPONENTS
 * Dropdown menus and selectors
 * ======================================== */

.math-app-header-dropdown-label {
    font-size: clamp(12px, 2vw, 16px);
    font-weight: normal;
    color: white;
}

.math-app-header-dropdown {
    font-size: clamp(12px, 2vw, 16px);
    padding: clamp(4px, 0.5vw, 8px) clamp(8px, 1vw, 16px);
    border-radius: clamp(4px, 0.5vw, 8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.9);
    color: black;
    min-width: clamp(80px, 10vw, 120px);
}

/* ========================================
 * PAGE INDICATOR
 * Page navigation and status display
 * ======================================== */

.math-app-page-indicator,
.page-indicator {
    position: absolute;
    z-index: var(--z-header);
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    top: clamp(8px, 1vw, 16px);
    right: clamp(16px, 2vw, 32px);
    background-color: var(--color-overlay-dark);
    color: var(--color-white);
    padding: clamp(8px, 1vw, 16px) clamp(16px, 2vw, 32px);
    border-radius: clamp(16px, 2vw, 32px);
    font-size: clamp(12px, 2vw, 16px);
    font-weight: bold;
    border: 2px solid var(--color-overlay-light);
    box-shadow: var(--shadow-lg);
}

.page-indicator {
    padding: 10px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* ========================================
 * PROBLEMSOLVE HEADER COMPONENT
 * Modern header with logo and navigation tabs
 * ======================================== */

.problem-solve-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(8px, 1.5vw, 16px) clamp(16px, 2vw, 32px);
    /* Glassmorphism effect */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    /* Remove fixed positioning and sizing - let coordinates control this */
    /* position: relative; */
    /* min-height: 60px; */
}

.problem-solve-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Glassmorphism background overlay */
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(0, 0, 0, 0.05) 100%);
    /* Background will be set by component props */
    z-index: -1;
}

/* Logo Section */
.problem-solve-logo {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1vw, 12px);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.challenge-icon {
    background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.challenge-symbol {
    font-size: 24px;
    font-weight: bold;
    color: white;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.logo-text {
    /* font-size: 20px; - Removed to allow JavaScript props to control */
    font-weight: 600;
    color: white;
    font-family: 'Arial', sans-serif;
    letter-spacing: -0.5px;
}

/* ========================================
 * QUESTION TEXT BOX COMPONENT
 * Question display with Q icon and separator
 * ======================================== */

.question-text-box {
    /* background-color: #1A1D29; - Removed to allow JavaScript props to control */
    /* border-radius: 12px; - Removed to allow JavaScript props to control */
    /* padding: 20px; - Removed to allow coordinate system to control height */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    /* Debug: Make sure it's visible */
    /* border: 2px solid red; - Removed to allow JavaScript props to control */
    /* min-height: 80px; - Removed to allow coordinate system to control height */
    /* Remove positioning - handled by coordinate system */
    /* display: flex; - handled by finalStyles */
    /* align-items: center; - handled by finalStyles */
    /* position: relative; - handled by coordinate system */
}

.question-icon {
    /* width: 40px; - Removed to allow JavaScript props to control */
    /* height: 40px; - Removed to allow JavaScript props to control */
    background-color: #1E9E7B;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.question-q {
    /* font-size: 20px; - Removed to allow JavaScript props to control */
    font-weight: bold;
    color: white;
    line-height: 1;
}

.separator-line {
    width: 2px;
    /* height: 40px; - Removed to allow JavaScript props to control */
    background-color: #1E9E7B;
    margin-right: 16px;
    flex-shrink: 0;
}

.question-text {
    /* color: white; - Removed to allow JavaScript props to control */
    font-family: 'Arial', sans-serif;
    line-height: 1.4;
    flex: 1;
}

/* Highlight styles for question text */
.question-text span {
    transition: all 0.2s ease;
}

.question-text span:hover {
    transform: scale(1.02);
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1vw, 16px);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    /* border-radius: 25px; - Removed to allow JavaScript props to control */
    padding: clamp(8px, 1vw, 12px) clamp(16px, 2vw, 24px);
    margin-left: clamp(20px, 4vw, 60px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        inset 0 -2px 0 rgba(0, 0, 0, 0.3),
        inset 1px 0 0 rgba(255, 255, 255, 0.05),
        inset -1px 0 0 rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    /* Make height 90% of the parent header height */
    height: 80%;
    box-sizing: border-box;
}

.tab-navigation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.02) 30%,
        rgba(0, 0, 0, 0.1) 70%,
        rgba(0, 0, 0, 0.2) 100%);
    border-radius: inherit; /* Inherit border-radius from parent tab-navigation */
    z-index: -1;
}

.tab-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    /* font-size: 16px; - Removed to allow JavaScript props to control */
    font-weight: 500;
    /* padding: clamp(8px, 1vw, 12px) clamp(12px, 1.5vw, 20px); - Removed to allow JavaScript props to control */
    /* border-radius: 20px; - Removed to allow JavaScript props to control */
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Arial', sans-serif;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    /* Make height 80% of the parent tab-navigation height */
    height: 80%;
    box-sizing: border-box;
    /* Ensure text fits properly */
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: inherit; /* Inherit border-radius from parent tab-button */
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-button:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.tab-button:hover::before {
    opacity: 1;
}

.tab-button.active {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tab-button.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: inherit; /* Inherit border-radius from parent tab-button */
    z-index: -1;
}

