/* auth-register.css
   Moved out of auth/register.php (was an inline block).
   Code is unchanged from the inline version; see docs/ASSETS.md. */
/* ===== Register page design (scoped to .login-*, same look as login.php) ===== */
body { background: #dddddd; }

.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 24px 16px;
    font-family: 'Poppins', system-ui, sans-serif;
}

.login-card {
    display: grid;
    grid-template-columns: 45% 55%;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    overflow: hidden;
}

/* Left: welcome panel */
.login-welcome-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 36px;
    text-align: center;
    color: #fff;
    background: linear-gradient(180deg, #f0555a 0%, #d0141c 100%);
}

.login-welcome-side h2 {
    margin: 0 0 18px;
    font-size: 1.9rem;
    font-weight: 600;
}

.login-welcome-side p {
    margin: 0 0 28px;
    max-width: 340px;
    font-size: 1.1rem;
    line-height: 1.7;
}

.login-welcome-side a.login-signup-btn {
    display: inline-block;
    padding: 18px 44px;
    border-radius: 999px;
    background: #e0343b;
    color: #fff;
    font-size: 1.05rem;
    text-decoration: none;
    transition: background .2s, transform .1s;
}

.login-welcome-side a.login-signup-btn:hover { background: #c9262d; }
.login-welcome-side a.login-signup-btn:active { transform: scale(.98); }

/* Right: form */
.login-form-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 36px;
}

.login-form-side h1 {
    margin: 0 0 24px;
    text-align: center;
    font-size: 2.3rem;
    font-weight: 600;
    color: #000;
}

.login-form-side form { display: flex; flex-direction: column; gap: 14px; }

.login-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.login-form-side .sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.login-form-side input[type="text"],
.login-form-side input[type="email"],
.login-form-side input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    height: 52px;
    padding: 0 18px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: #efefef;
    font: inherit;
    font-size: 1rem;
    color: #222;
    outline: none;
    transition: border-color .2s, background .2s;
}

.login-form-side input::placeholder { color: #9a9a9a; }

.login-form-side input:focus {
    background: #fff;
    border-color: #e0343b;
}

.login-form-side button[type="submit"] {
    height: 58px;
    margin-top: 4px;
    border: 0;
    border-radius: 8px;
    background: #d0141c;
    color: #fff;
    font: inherit;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background .2s, transform .1s;
}

.login-form-side button[type="submit"]:hover  { background: #a80f16; }
.login-form-side button[type="submit"]:active { transform: scale(.99); }

.login-error {
    margin-bottom: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: .92rem;
}

/* ===== Rounded card + corner accents ===== */
.login-card {
    border-radius: 24px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .12);
}

/* Soft translucent circles in the panel corners */
.login-welcome-side::before,
.login-welcome-side::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.login-welcome-side::before {
    width: 280px; height: 280px;
    top: -100px; right: -100px;
    background: rgba(255, 255, 255, .13);
}
.login-welcome-side::after {
    width: 210px; height: 210px;
    bottom: -80px; left: -80px;
    background: rgba(255, 255, 255, .09);
}
.login-welcome-side > * { position: relative; z-index: 1; }

/* ===== Page transitions ===== */
.login-form-side,
.login-welcome-side { position: relative; }
.login-welcome-side { z-index: 2; }

.login-form-side > *,
.login-welcome-side > * { transition: opacity .25s ease; }

/* Leaving: the two halves slide past each other and swap places */
.login-card.is-leaving .login-form-side,
.login-card.is-leaving .login-welcome-side {
    transition: transform .65s cubic-bezier(.77, 0, .18, 1);
}
.login-card.is-leaving .login-form-side > *,
.login-card.is-leaving .login-welcome-side > * { opacity: 0; }

/* Arriving */
@keyframes authFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}
@keyframes authFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
/* Fresh visit: card gently rises in */
.login-card { animation: authFadeUp .5s ease backwards; }
/* Coming from the other form: halves are already in place, just fade content in */
html.auth-swap .login-card { animation: none; }
html.auth-swap .login-form-side > *,
html.auth-swap .login-welcome-side > * { animation: authFade .5s ease .05s backwards; }

@media (prefers-reduced-motion: reduce) {
    .login-card,
    .login-form-side > *,
    .login-welcome-side > * { animation: none !important; }
    .login-card.is-leaving .login-form-side,
    .login-card.is-leaving .login-welcome-side { transition: none !important; }
}

/* Mobile: stack the panels, form first */
@media (max-width: 768px) {
    .login-card { grid-template-columns: 1fr; min-height: 0; }
    .login-form-side,
    .login-welcome-side { padding: 36px 24px; }
    .login-form-side { order: 1; }
    .login-welcome-side { order: 2; }
    .login-row { grid-template-columns: 1fr; }
    .login-form-side h1 { font-size: 2rem; }
}
