/* ==================================================
   HEADER.CSS
   Purpose: Global navigation styles including
   logo, links, and authentication inputs.
   ================================================== */

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border-steel);
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    position: relative;
    z-index: 1000;
}

.nav-left,
.nav-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-right {
    padding-right: 10px;
}

.nav-logo {
    height: 20px;
    margin-left: 10px;
    filter: brightness(1.1); 
}

.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    padding-top: 2px;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text-white);
}

/* Authentication Inputs & Buttons */
.header-input {
    background-color: var(--border-steel);
    border: 1px solid var(--border-input);
    color: var(--text-white);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    outline: none;
}

.header-input:focus {
    border-color: var(--brand-blue);
}

.header-button {
    height: 24px;
    padding: 0 15px;
    font-size: 12px;
    color: var(--text-white);
    background-color: var(--brand-blue);
    border: none;
    border-radius: 28px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: background-color 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Icons */
#help-icon {
    display: none; /* Controlled by JS */
    cursor: pointer;
}

.custom-help-icon {
    background-color: var(--brand-blue);
    color: var(--text-white);
    border-radius: 50%;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    line-height: 1;
}

.custom-help-icon:hover,
.header-button:hover {
    background-color: var(--brand-active);
}

/* Mobile Optimization */
@media (max-width: 768px) {
    /* Hide the email input AND any text (like "Authenticated" or "User123") */
    #login-container {
        display: flex;
        align-items: center;
    }

    /* Hide the input field */
    #login-email {
        display: none;
    }

    /* Target the text specifically. 
       If your JS injects a span for the username, target it here: */
    #login-container span, 
    #username-display { 
        display: none !important; 
    }

    /* Keep the button visible and compact */
    .header-button {
        padding: 5px 12px;
        font-size: 14px;
    }
}

/* The semi-transparent background covering the whole screen */
#login-modal {
    position: fixed;
    z-index: 10000; /* Stays on top of everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dims the page */
    backdrop-filter: blur(4px); /* Modern blur effect */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The actual box in the middle */
.modal-content {
    background-color: #1e293b; /* Matches your AuthUI theme */
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px; /* Prevents it from spreading out */
    text-align: center;
    border: 1px solid #334155;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* The 'X' close button */
.close {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #94a3b8;
    font-size: 24px;
    cursor: pointer;
}

.close:hover {
    color: white;
}