/* ═══════════════════════════════════════════════════════════════════════
   auth.css — Shared styles for Login, Signup, OTP, Reset Password
   White + pink brand. Animated floating labels. Micro-interactions.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --auth-pink: #D81861;
    --auth-pink-hover: #C2185B;
    --auth-pink-light: rgba(216, 24, 97, .06);
    --auth-pink-glow: rgba(216, 24, 97, .15);
    --auth-text: #1a1a2e;
    --auth-muted: #7f8c8d;
    --auth-border: #e8e8e8;
    --auth-bg: #f5f6fa;
    --auth-card-shadow: 0 8px 40px rgba(0,0,0,.06);
    --auth-radius: 14px;
    --auth-input-radius: 10px;
    --auth-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ── Page layout ── */
.auth-page {
    font-family: var(--auth-font);
    background: var(--auth-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.auth-page-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
/* Footer stays at the bottom, full width */
.auth-page > footer { width: 100%; }

/* ── Entrance animation ── */
@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes authFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Card ── */
.auth-card {
    background: #fff;
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-card-shadow);
    width: 100%;
    max-width: 420px;
    padding: 2.25rem 2rem;
    animation: authSlideUp .5s cubic-bezier(.22,.68,0,1) both;
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--auth-pink), #ff6b9d, var(--auth-pink));
    background-size: 200% 100%;
    animation: authGradientShift 3s ease infinite;
}
@keyframes authGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ── Logo ── */
.auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: authFadeIn .6s .1s both;
}
.auth-logo img {
    height: 44px;
    width: auto;
    transition: transform .3s;
}
.auth-logo img:hover { transform: scale(1.05); }

/* ── Header ── */
.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: authFadeIn .6s .15s both;
}
.auth-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--auth-text);
    margin: 0 0 .3rem;
}
.auth-header p {
    font-size: .8rem;
    color: var(--auth-muted);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   FLOATING LABEL INPUT
   ═══════════════════════════════════════════════════════════════════════ */
.auth-field {
    position: relative;
    margin-bottom: 1.25rem;
    animation: authFadeIn .5s both;
}
.auth-field:nth-child(1) { animation-delay: .2s; }
.auth-field:nth-child(2) { animation-delay: .25s; }
.auth-field:nth-child(3) { animation-delay: .3s; }

.auth-field-inner {
    position: relative;
}

/* The actual input */
.auth-input {
    width: 100%;
    padding: .85rem .9rem .85rem 2.75rem;
    font-size: .875rem;
    color: var(--auth-text);
    background: #fff;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-input-radius);
    outline: none;
    transition: border-color .25s, box-shadow .25s, background .25s;
    -webkit-appearance: none;
}
.auth-input::placeholder {
    color: transparent; /* Hidden — label acts as placeholder */
}
.auth-input:focus {
    border-color: var(--auth-pink);
    box-shadow: 0 0 0 3.5px var(--auth-pink-glow);
    background: #fff;
}
/* Pink pulse on focus */
.auth-input:focus ~ .auth-field-highlight {
    opacity: 1;
    transform: scaleX(1);
}

/* Floating label */
.auth-label {
    position: absolute;
    left: 2.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .875rem;
    color: #aaa;
    pointer-events: none;
    transition: all .2s cubic-bezier(.4,0,.2,1);
    background: transparent;
    padding: 0 .25rem;
    line-height: 1;
}
/* Float up when focused or has value */
.auth-input:focus ~ .auth-label,
.auth-input:not(:placeholder-shown) ~ .auth-label {
    top: 0;
    transform: translateY(-50%);
    font-size: .7rem;
    font-weight: 600;
    color: var(--auth-pink);
    background: #fff;
    left: .75rem;
    padding: 0 .35rem;
}

/* Icon */
.auth-field-icon {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #c0c0c0;
    font-size: .85rem;
    transition: color .25s;
    pointer-events: none;
    z-index: 1;
}
.auth-input:focus ~ .auth-field-icon {
    color: var(--auth-pink);
}

/* Bottom highlight line */
.auth-field-highlight {
    position: absolute;
    bottom: 0; left: 5%; right: 5%;
    height: 2px;
    background: var(--auth-pink);
    border-radius: 2px;
    opacity: 0;
    transform: scaleX(0);
    transition: transform .3s, opacity .3s;
}

/* Password toggle */
.auth-pw-toggle {
    position: absolute;
    right: .9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    cursor: pointer;
    font-size: .85rem;
    transition: color .2s;
    z-index: 1;
    background: none;
    border: none;
    padding: 0;
}
.auth-pw-toggle:hover { color: var(--auth-pink); }

/* Error text */
.auth-error {
    font-size: .72rem;
    color: #dc3545;
    margin-top: .3rem;
    min-height: .9rem;
    padding-left: .25rem;
    transition: opacity .2s;
}
.auth-error:empty { opacity: 0; }
.auth-success {
    font-size: .72rem;
    color: #28a745;
    margin-top: .3rem;
    padding-left: .25rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════ */
.auth-btn {
    width: 100%;
    padding: .8rem;
    border: none;
    border-radius: var(--auth-input-radius);
    background: var(--auth-pink);
    color: #fff;
    font-size: .875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    position: relative;
    overflow: hidden;
    animation: authFadeIn .5s .35s both;
}
.auth-btn:hover:not(:disabled) {
    background: var(--auth-pink-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--auth-pink-glow);
}
.auth-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px var(--auth-pink-glow);
}
.auth-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}
/* Ripple effect */
.auth-btn::after {
    content: '';
    position: absolute;
    width: 0; height: 0;
    background: rgba(255,255,255,.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width .4s, height .4s, opacity .4s;
    opacity: 0;
}
.auth-btn:active::after {
    width: 300px; height: 300px;
    opacity: 0;
    transition: 0s;
}

.auth-btn .spinner-border {
    width: 1.15rem;
    height: 1.15rem;
    border-width: 2px;
}

/* ── Links ── */
.auth-link {
    color: var(--auth-pink);
    font-weight: 600;
    font-size: .8rem;
    text-decoration: none;
    transition: color .2s;
}
.auth-link:hover {
    color: var(--auth-pink-hover);
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: .8rem;
    color: var(--auth-muted);
    animation: authFadeIn .5s .4s both;
}

/* ── Divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    gap: .75rem;
    color: var(--auth-muted);
    font-size: .75rem;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

/* ── Helper row (forgot password, back, etc.) ── */
.auth-helper-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: .75rem;
    margin-top: -.25rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1.25rem;
        border-radius: 12px;
        max-width: 100%;
    }
    .auth-header h2 { font-size: 1.15rem; }
    .auth-input { padding: .75rem .8rem .75rem 2.5rem; font-size: .8125rem; }
    .auth-label { font-size: .8125rem; }
    .auth-btn { padding: .7rem; font-size: .8125rem; }
}

/* ── Select fields (for signup country/state — keep MDB selects working) ── */
.auth-select-group {
    margin-bottom: 1rem;
    animation: authFadeIn .5s .25s both;
}
.auth-select-group label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    color: var(--auth-muted);
    margin-bottom: .3rem;
    padding-left: .25rem;
}
