﻿/* ============================================================
   auth.css â€” Login modal for CSL Platform
   ============================================================ */

/* â”€â”€ Overlay â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 14, 26, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.auth-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

/* â”€â”€ Card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface, #1a1f2e);
    border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 20px;
    padding: 40px 36px 32px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
    transform: translateY(12px);
    transition: transform 0.22s ease;
}

.auth-overlay.is-visible .auth-card {
    transform: translateY(0);
}

/* â”€â”€ Logo â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 28px;
}

.auth-logo-mark {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--accent, #c96a3d);
    line-height: 1;
}

.auth-logo-sub {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-secondary, rgba(255,255,255,0.45));
    margin-top: 4px;
}

/* â”€â”€ Heading â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.auth-heading {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text-main, #f1f5f9);
    text-align: center;
    margin: 0 0 6px;
}

.auth-sub {
    font-size: 0.88rem;
    color: var(--text-secondary, rgba(255,255,255,0.5));
    text-align: center;
    margin: 0 0 28px;
    line-height: 1.5;
}

/* â”€â”€ Form â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-field label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary, rgba(255,255,255,0.55));
}

.auth-field input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: 10px;
    background: var(--surface-raised, rgba(255,255,255,0.04));
    color: var(--text-main, #f1f5f9);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.auth-field input::placeholder {
    color: var(--text-secondary, rgba(255,255,255,0.25));
}

.auth-field input:focus {
    border-color: var(--accent, #c96a3d);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

/* â”€â”€ Error â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.auth-error {
    font-size: 0.84rem;
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0;
    line-height: 1.45;
}

/* â”€â”€ Success â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.auth-success {
    font-size: 0.84rem;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.25);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0;
    line-height: 1.45;
}

[data-theme="light"] .auth-success {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.2);
}

/* â”€â”€ Submit button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    margin-top: 4px;
    background: var(--accent, #c96a3d);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.96rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, opacity 0.15s;
}

.auth-submit-btn:hover:not(:disabled) {
    background: #6d28d9;
}

.auth-submit-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Spinner animation */
.auth-btn-spinner svg {
    animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

/* â”€â”€ Select dropdown â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.auth-field select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: 10px;
    background-color: var(--surface-raised, rgba(255,255,255,0.04));
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 12px;
    color: var(--text-main, #f1f5f9);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 36px;
}

.auth-field select:focus {
    border-color: var(--accent, #c96a3d);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

.auth-field select option {
    background: #1a1f2e;
    color: #f1f5f9;
    padding: 8px 12px;
}

/* â”€â”€ Footer note â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.auth-footer {
    font-size: 0.78rem;
    color: var(--text-secondary, rgba(255,255,255,0.35));
    text-align: center;
    margin: 24px 0 0;
    line-height: 1.5;
}

.auth-link {
    color: var(--accent, #c96a3d);
    text-decoration: none;
    font-weight: 600;
}

.auth-link:hover {
    text-decoration: underline;
}

/* â”€â”€ Light theme overrides â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

[data-theme="light"] .auth-overlay {
    background: rgba(241, 245, 249, 0.88);
}

[data-theme="light"] .auth-card {
    background: #ffffff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 32px 80px rgba(0,0,0,0.12);
}

[data-theme="light"] .auth-logo-mark {
    color: var(--accent, #c96a3d);
}

[data-theme="light"] .auth-heading {
    color: #0f172a;
}

[data-theme="light"] .auth-sub,
[data-theme="light"] .auth-field label,
[data-theme="light"] .auth-footer {
    color: #64748b;
}

[data-theme="light"] .auth-field input {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}

[data-theme="light"] .auth-field select {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}

[data-theme="light"] .auth-field input::placeholder {
    color: #94a3b8;
}

[data-theme="light"] .auth-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

[data-theme="light"] .auth-field select option {
    background: #ffffff;
    color: #0f172a;
}

/* â”€â”€ User chip logout button â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.auth-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    margin-left: 6px;
    background: transparent;
    border: 1px solid var(--border, rgba(255,255,255,0.12));
    border-radius: 20px;
    color: var(--text-secondary, rgba(255,255,255,0.5));
    font-size: 0.72rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.auth-logout-btn:hover {
    color: var(--text-main, #f1f5f9);
    border-color: var(--border, rgba(255,255,255,0.28));
}

[data-theme="light"] .auth-logout-btn {
    border-color: #e2e8f0;
    color: #64748b;
}

[data-theme="light"] .auth-logout-btn:hover {
    color: #0f172a;
    border-color: #94a3b8;
}

/* â”€â”€ BÃ¸rnehub-knap i login-view â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.auth-children-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 14px;
    color: var(--text-secondary, rgba(255,255,255,0.35));
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.auth-children-divider::before,
.auth-children-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--border, rgba(255,255,255,0.1));
}

[data-theme="light"] .auth-children-divider {
    color: #94a3b8;
}

[data-theme="light"] .auth-children-divider::before,
[data-theme="light"] .auth-children-divider::after {
    border-color: #e2e8f0;
}

.auth-children-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border, rgba(255,255,255,0.12));
    border-radius: 8px;
    background: transparent;
    color: var(--text-main, #f1f5f9);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.auth-children-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.25);
}

.auth-children-btn-sub {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary, rgba(255,255,255,0.45));
}

[data-theme="light"] .auth-children-btn {
    color: #0f172a;
    border-color: #e2e8f0;
}

[data-theme="light"] .auth-children-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

[data-theme="light"] .auth-children-btn-sub {
    color: #64748b;
}

/* â”€â”€ Demo-knap i login-view â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.auth-demo-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(124, 58, 237, 0.35);
    border-radius: 8px;
    background: rgba(124, 58, 237, 0.08);
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.auth-demo-btn:hover {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.6);
}

[data-theme="light"] .auth-demo-btn {
    color: #0f172a;
    border-color: rgba(124, 58, 237, 0.3);
    background: rgba(124, 58, 237, 0.06);
}

[data-theme="light"] .auth-demo-btn:hover {
    background: rgba(124, 58, 237, 0.12);
    border-color: rgba(124, 58, 237, 0.5);
}

/* â”€â”€ Demo-banner (vist oppe i app, ikke i modal) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.csl-demo-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 7px 16px;
    background: rgba(124, 58, 237, 0.15);
    border-bottom: 1px solid rgba(124, 58, 237, 0.3);
    font-size: 0.8rem;
    color: var(--text-secondary);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.csl-demo-banner-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.csl-demo-banner-link:hover {
    text-decoration: underline;
}

.csl-demo-banner-actions {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

[data-theme="light"] .csl-demo-banner {
    background: rgba(124, 58, 237, 0.07);
    border-bottom-color: rgba(124, 58, 237, 0.2);
}

/* â”€â”€ Demo-banner body offset â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Prevents nav/content from being hidden behind the fixed banner */

body.has-demo-banner {
    padding-top: 34px;
}

/* â”€â”€ TOS-checkbox i registrering â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.auth-tos-field {
    margin-top: 4px;
}

.auth-tos-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary, rgba(255,255,255,0.65));
    line-height: 1.5;
}

.auth-tos-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: var(--accent, #7c6ef7);
}

[data-theme="light"] .auth-tos-label {
    color: #475569;
}

/* â”€â”€ Mobil: iOS zoom-fix + kompakt padding â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€
   iOS Safari zoomer automatisk ind pÃ¥ inputs og selects med
   font-size under 16px. auth-field input/select er 0.95rem
   (~15.2px) â€” det udloser zoom og bryder modal-layoutet.
   Fix: hev til 1rem (16px) pa mobil. Padding reduceres
   for at spare plads pa smal skaerm.
*/
@media (max-width: 600px) {
    .auth-field input,
    .auth-field select {
        font-size: 1rem;
    }

    .auth-card {
        padding: 28px 20px 24px;
        border-radius: 16px;
    }

    .auth-logo {
        margin-bottom: 18px;
    }

    .auth-heading {
        font-size: 1.3rem;
    }

    .auth-sub {
        margin-bottom: 20px;
    }
}
