/* COMPONENT: SIGN-IN AND SIGN-UP MODAL STYLES */

/* 1. Root Variables & Base Styles */
:root {
    --auth-font-heading: 'Syne', sans-serif;
    --auth-font-body: 'Inter', sans-serif;
    
    /* Colors based on the style-guide.html 'on-inverse' theme */
    --auth-color-overlay: rgba(0, 0, 0, 0.75);
    --auth-color-container-bg: rgba(34, 34, 34, 0.9);
    --auth-color-text: #FFFFFF;
    --auth-color-text-inactive: #AAAAAA;
    --auth-color-input-bg: #FFFFFF;
    --auth-color-input-text: #1A1A1A;
    --auth-color-input-border: #444444;
    --auth-color-tab-active-bg: #3A3A3A;
    --auth-color-tab-active-text: #FFFFFF;
    --auth-color-button-bg: #FFFFFF;
    --auth-color-button-text: #1A1A1A;
    --auth-color-accent: #146EF5;

    /* Feedback Colors from Instructions */
    --auth-color-success: #03C03C;
    --auth-color-error: #D80621;
    --auth-color-validation: #3A3A3A;
}

/* 2. Overlay & Container */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--auth-color-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.auth-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}
.auth-container {
    width: 100%;
    max-width: 480px;
    height: 560px;
    background-color: var(--auth-color-container-bg);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: var(--auth-color-text);
    font-family: var(--auth-font-body);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.auth-overlay.is-visible .auth-container {
    transform: scale(1);
}

/* 3. Header, Tabs & Close Button */
.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    flex-shrink: 0;
}
.auth-tabs {
    display: flex;
    gap: 0.5rem;
}
.auth-tab {
    font-family: var(--auth-font-body);
    font-size: 1rem;
    padding: 0.6rem 1.1rem;
    border: none;
    background-color: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
.auth-tab:not(.is-active) {
    color: var(--auth-color-text-inactive);
    font-weight: 400;
}
.auth-tab.is-active {
    background-color: var(--auth-color-tab-active-bg);
    color: var(--auth-color-tab-active-text);
    font-weight: 700;
}
.auth-close {
    background: none;
    border: none;
    color: var(--auth-color-text);
    font-size: 2rem;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.auth-close:hover {
    opacity: 1;
}

/* 4. Form Body & Inputs */
.auth-body {
    padding: 0 2.5rem;
    flex-grow: 1;
    overflow-y: auto;
    display: flex; 
    flex-direction: column; 
}
.auth-form {
    display: none;
    flex-direction: column;
    gap: 3rem; 
}
.auth-form.is-active {
    display: flex;
}
#auth-signin-form.is-active {
    padding-top: 4rem;
    gap: 4rem;
}
.auth-input-group {
    display: flex;
    flex-direction: column;
}
.auth-label {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--auth-color-text-inactive);
}
.auth-input {
    background-color: var(--auth-color-input-bg);
    color: var(--auth-color-input-text);
    border: 1px solid var(--auth-color-input-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--auth-font-body);
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-input:focus {
    outline: none;
    border-color: var(--auth-color-accent); 
    box-shadow: 0 0 0 3px rgba(20, 110, 245, 0.3);
}

/* 5. Footer & Submit Button */
.auth-footer {
    padding: 0 2.5rem 2.5rem 2.5rem;
    flex-shrink: 0;
}
.auth-submit-button {
    width: 100%;
    height: 52px;
    font-family: var(--auth-font-body);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    background-color: var(--auth-color-button-bg);
    color: var(--auth-color-button-text);
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.auth-submit-button:hover {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
}
.auth-submit-button:active {
    transform: translateY(0);
    filter: brightness(0.95);
    box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.3);
}
.auth-submit-button:focus-visible {
    outline: 2px solid var(--auth-color-accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

/* 6. Feedback Snackbar */
.auth-feedback-container {
    position: absolute;
    top: 90px;
    left: 2.5rem;
    right: 2.5rem;
    z-index: 10;
    pointer-events: none;
}
.auth-snackbar {
    height: 32px;
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--auth-color-text);
    font-size: 14px;
    font-weight: 500;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.auth-snackbar.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.auth-snackbar.is-validation { background-color: var(--auth-color-validation); }
.auth-snackbar.is-error { background-color: var(--auth-color-error); }
.auth-snackbar.is-success { background-color: var(--auth-color-success); }

/* 7. Responsiveness */
@media (max-width: 520px) {
    .auth-container {
        max-width: 90%;
        height: 90%;
        max-height: 560px;
    }
    .auth-header, .auth-body, .auth-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .auth-feedback-container {
        left: 1.5rem;
        right: 1.5rem;
        top: 80px;
    }
    .auth-tab {
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem;
    }
}

