/* ==========================================================================
   layout/auth.css — authentication pages (login, register, forgot, reset)
   --------------------------------------------------------------------------
   Page-level layout only; inputs/buttons/alerts come from components/*.
   Centered column with the brand on top — Stripe flat look.
   ========================================================================== */

.auth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-7) var(--space-4);
}

/* Vertically center the card in the viewport (login screen) */
.auth.auth-center {
    justify-content: center;
}

/* Brand text above the card */
.auth .auth-brand {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    margin-bottom: var(--space-5);
}

/* The auth card: narrow for login, wide for registration */
.auth .auth-card {
    width: 100%;
    max-width: 440px;
}

.auth .auth-card.is-wide {
    max-width: 680px;
}

.auth .auth-card h1 {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-1);
}

.auth .auth-subtitle {
    color: var(--color-text-muted);
    margin-bottom: var(--space-5);
}

/* Section heading inside a long form (Personal info, Company...).
   NOT scoped to .auth — the registration form now lives in the login
   slide-in (outside .auth). */
.auth-section {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin: var(--space-5) 0 var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border);
}

/* Account type selector — two 50/50 selectable cards (radio inside) */
.type-select {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

/* Account type = a "kučica": rounded card with a big faded corner icon
   pushed half in / half out of the corner. */
.type-option {
    position: relative;
    overflow: hidden;
    display: block;
    border: 1px solid var(--color-border-strong);
    border-radius: 14px;
    padding: var(--space-4);
    min-height: 92px;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.type-option input {
    position: absolute;
    opacity: 0;
}

.type-option .type-option-icon {
    position: absolute;
    right: -16px;
    bottom: -20px;
    font-size: 92px;
    line-height: 1;
    opacity: 0.09;
    color: var(--color-primary);
    transform: rotate(-15deg);
    pointer-events: none;
}

.type-option .type-title {
    position: relative;
    z-index: 1;
    display: block;
    font-weight: var(--font-weight-semibold);
}

.type-option .type-desc {
    position: relative;
    z-index: 1;
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
    max-width: 82%;
}

/* Selected type (register.js toggles .is-selected) */
.type-option.is-selected {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
}

/* Links under the card (no account? / already registered?) */
.auth .auth-alt {
    margin-top: var(--space-4);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    text-align: center;
}

/* Alternative sign-ins (passkey / Google) — evenly spaced stack */
.auth .auth-alt-logins {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* "or" divider between Google button and the email form */
.auth .auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: var(--space-4) 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.auth .auth-divider::before,
.auth .auth-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--color-border);
}

/* Mobile */
@media (max-width: 640px) {
    .auth {
        padding: var(--space-5) var(--space-3);
    }

    .type-select {
        grid-template-columns: 1fr;
    }
}

/* Section heading with an inline action (e.g. "Copy from above" on the
   representative fields in the business registration form). */
.auth-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.auth-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
}

.auth-copy-btn:hover {
    text-decoration: underline;
}
