/*
========================================
COMPONENT: SIGN-IN AND SIGN-UP MODAL
FILE: css/modal-auth.css
========================================
*/

:root {
    /* Color Palette */
    --auth-background: #FFFFFF;
    --auth-overlay: rgba(0, 0, 0, 0.6);
    --auth-border-color: #E0E0E0;
    --auth-red: #D80621;
    --auth-green: #03C03C;
    --auth-white: #FFFFFF;
    --auth-text-secondary: #888888;
    --auth-text-primary: #333333;
    --auth-accent-primary: #146EF5;
    --auth-accent-primary-dark: #0d5ad9;
    --auth-focus-shadow: rgba(20, 110, 245, 0.3);
    --auth-validation-grey: #3A3A3A;
}

.auth-scroll-lock {
    overflow: hidden;
}

/*
========================================
MODAL STYLES
========================================
*/

/* 2.5 OVERLAY */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--auth-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 260ms ease-out, visibility 260ms ease-out;
    font-family: "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.auth-overlay.auth-visible {
    opacity: 1;
    visibility: visible;
}

/* 2.6 CONTAINER */
.auth-container {
    width: 100%;
    max-width: 480px;
    height: 560px;
    background-color: var(--auth-background);
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: var(--auth-text-primary);
    display: flex;
    flex-direction: column;
    transform: scale(0.96);
    transition: transform 260ms ease-out;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--auth-border-color);
}

.auth-overlay.auth-visible .auth-container {
    transform: scale(1);
}

/* 2.7 HEADER AND TABS */
.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    flex-shrink: 0;
    border-bottom: 1px solid var(--auth-border-color);
}

.auth-tabs {
    display: flex;
    gap: 1.5rem;
}

.auth-tab {
    background-color: transparent;
    border: none;
    color: var(--auth-text-secondary);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: all 150ms ease-in-out;
    border-bottom: 2px solid transparent;
}

.auth-tab.auth-active {
    color: var(--auth-accent-primary);
    font-weight: 700;
    border-bottom-color: var(--auth-accent-primary);
}

.auth-close {
    background: none;
    border: none;
    color: var(--auth-text-secondary);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 150ms ease-in-out, color 150ms ease-in-out;
    width: 32px;
    height: 32px;
    font-size: 1.5rem;
    line-height: 1;
}

.auth-close:hover {
    opacity: 1;
    color: var(--auth-text-primary);
}

/* 2.8 FORM BODY */
.auth-body {
    flex-grow: 1;
    padding: 2.5rem;
    overflow-y: auto;
}

.auth-form {
    display: none;
    flex-direction: column;
}

#auth-signin-form {
    gap: 2.5rem;
}
#auth-signup-form {
    gap: 0.9rem;
}

.auth-form.auth-active {
    display: flex;
}

.auth-input-group {
    display: flex;
    flex-direction: column;
}

.auth-label {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.auth-input {
    background-color: var(--auth-white);
    border: 1px solid var(--auth-border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--auth-text-primary);
    transition: border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;
}

.auth-input:focus {
    outline: none;
    border-color: var(--auth-accent-primary);
    box-shadow: 0 0 0 3px var(--auth-focus-shadow);
}

/* 2.9 FOOTER AND SUBMIT */
.auth-footer {
    padding: 2.5rem;
    padding-top: 1.5rem;
    margin-top: auto; /* Pushes footer to the bottom */
    flex-shrink: 0;
    background-color: #f7f7f7;
    border-top: 1px solid var(--auth-border-color);
}

/* 2.10 BUTTONS */
.auth-submit-button {
    width: 100%;
    height: 52px;
    background-color: var(--auth-accent-primary);
    color: var(--auth-white);
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 150ms ease-in-out;
}

.auth-submit-button:hover {
    background-color: var(--auth-accent-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.auth-submit-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--auth-focus-shadow);
}

.auth-submit-button:active {
    transform: translateY(0);
    filter: brightness(1.06);
    box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.1);
}

/* 2.11 FEEDBACK MESSAGE STATES */
.auth-snackbar {
    position: absolute;
    top: calc(2rem + 32px + 1rem); /* Header padding + tab height + gap */
    left: 2.5rem;
    right: 2.5rem;
    height: 32px;
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-white);
    font-size: 14px;
    font-weight: 500;
    transform: translateY(-20px);
    opacity: 0;
    transition: transform 300ms ease-out, opacity 300ms ease-out;
    z-index: 10;
    pointer-events: none;
}

.auth-snackbar.auth-show {
    transform: translateY(0);
    opacity: 1;
}

.auth-snackbar-validation { background-color: var(--auth-validation-grey); }
.auth-snackbar-error { background-color: var(--auth-red); }
.auth-snackbar-success { background-color: var(--auth-green); }
