/* ── MSR Auth Modal ─────────────────────────────────────────────── */

.msr-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.msr-auth-modal[hidden],
.msr-auth-modal [hidden] { display: none !important; }

.msr-auth-modal__bd {
    position: absolute;
    inset: 0;
    background: rgba(10, 11, 18, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: msr-auth-fade-in .2s ease;
}

.msr-auth-modal__box {
    position: relative;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(10, 11, 18, .22);
    width: 100%;
    max-width: 420px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 32px 28px 28px;
    animation: msr-auth-slide-in .22s cubic-bezier(.22,.68,0,1.2);
}

@keyframes msr-auth-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes msr-auth-slide-in {
    from { opacity: 0; transform: translateY(18px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);   }
}

/* Close button */
.msr-auth-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #aaa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    transition: color .15s, background .15s;
}
.msr-auth-modal__close:hover { color: #333; background: #f0f0f0; }
.msr-auth-modal__close svg { width: 18px; height: 18px; }

/* Tabs */
.msr-auth-tabs {
    display: flex;
    gap: 4px;
    background: #f4f4f6;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}
.msr-auth-tab {
    flex: 1;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    padding: 9px 12px;
    border-radius: 7px;
    transition: background .15s, color .15s, box-shadow .15s;
}
.msr-auth-tab--active {
    background: #fff;
    color: #1a1b1f;
    box-shadow: 0 1px 6px rgba(0,0,0,.1);
}

/* Form layout */
.msr-auth-form { display: flex; flex-direction: column; gap: 14px; }

.msr-auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.msr-auth-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.msr-auth-field label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
}
.msr-auth-hint {
    font-weight: 400;
    color: #aaa;
    font-size: 12px;
}

.msr-auth-field input[type="text"],
.msr-auth-field input[type="email"],
.msr-auth-field input[type="password"],
.msr-auth-field input[type="tel"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #ddd;
    border-radius: 9px;
    font-size: 15px;
    font-family: inherit;
    color: #1a1b1f;
    background: #fafafa;
    outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
    box-sizing: border-box;
}
.msr-auth-field input:focus {
    border-color: #d96c00;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(217,108,0,.12);
}
.msr-auth-field input.msr-input-error {
    border-color: #e03030;
    box-shadow: 0 0 0 3px rgba(224,48,48,.1);
}

/* Password field with toggle */
.msr-auth-pw-wrap {
    position: relative;
}
.msr-auth-pw-wrap input {
    padding-right: 44px !important;
}
.msr-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color .15s;
}
.msr-pw-toggle:hover { color: #555; }
.msr-pw-toggle svg { width: 18px; height: 18px; }

/* Password strength */
.msr-pw-strength {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    min-height: 16px;
}
.msr-pw-bar {
    flex: 1;
    height: 4px;
    background: #eee;
    border-radius: 99px;
    overflow: hidden;
}
.msr-pw-fill {
    height: 100%;
    width: 0;
    border-radius: 99px;
    transition: width .25s, background .25s;
}
.msr-pw-label { font-size: 11px; color: #aaa; white-space: nowrap; }

/* Checkbox / GDPR */
.msr-auth-check { margin-top: 2px; }
.msr-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}
.msr-check-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: #d96c00;
    cursor: pointer;
}
.msr-check-label a { color: #d96c00; text-decoration: underline; }

/* Submit button */
.msr-auth-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #ff7a18, #d96c00);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: .03em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity .15s, transform .15s, box-shadow .15s;
    box-shadow: 0 3px 14px rgba(217,108,0,.3);
    margin-top: 4px;
}
.msr-auth-btn:hover:not(:disabled) {
    opacity: .92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(217,108,0,.35);
}
.msr-auth-btn:disabled { opacity: .6; cursor: wait; }

.msr-auth-btn__spin {
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: msr-spin .7s linear infinite;
}
@keyframes msr-spin { to { transform: rotate(360deg); } }

/* Feedback messages */
.msr-auth-msg {
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.5;
}
.msr-auth-msg--err {
    background: #fff1f1;
    color: #c0392b;
    border: 1px solid #f5c6c6;
}
.msr-auth-msg--ok {
    background: #f0faf4;
    color: #1a7a3f;
    border: 1px solid #b2dfca;
}
.msr-auth-msg a { color: inherit; text-decoration: underline; cursor: pointer; }

/* Verify banners (top of page) */
.msr-verify-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99998;
    text-align: center;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    animation: msr-banner-drop .3s ease;
}
@keyframes msr-banner-drop {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}
.msr-verify-banner--ok  { background: #1a7a3f; color: #fff; }
.msr-verify-banner--err { background: #c0392b; color: #fff; }
.msr-verify-banner a    { color: #fff; text-decoration: underline; cursor: pointer; }

/* ── Glemt passord ──────────────────────────────────────────────── */
.msr-auth-forgot-link {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    margin: 10px auto 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    font: inherit;
    font-size: 13px;
    color: #888;
    cursor: pointer;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.msr-auth-forgot-link:hover { color: #555; }

.msr-auth-forgot-intro {
    margin: 0 0 18px;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.msr-auth-forgot-back {
    display: block;
    margin: 12px auto 0;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 13px;
    color: #888;
    cursor: pointer;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.msr-auth-forgot-back:hover { color: #555; }

/* ── "Ikke konto?" switch link ──────────────────────────────────── */
.msr-auth-switch {
    margin: 0 0 14px;
    font-size: 13px;
    color: #666;
    text-align: center;
}
.msr-auth-switch-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #0077a0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.msr-auth-switch-btn:hover { color: #005880; }

@media (max-width: 480px) {
    .msr-auth-modal__box { padding: 24px 18px 22px; border-radius: 16px; }
    .msr-auth-row { grid-template-columns: 1fr; gap: 14px; }
}
