﻿
/* ==========================================
   1. Algemene layout
   ========================================== */

.identity-container {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.identity-form {
    width: 100%;
    max-width: 420px;
}

.identity-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.identity-description {
    color: #6c757d;
    margin-bottom: 2rem;
}

.identity-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
}


/* ==========================================
   2. Formulieren
   ========================================== */

.identity-label {
    display: block;
    color: #343a40;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    padding-bottom: 4px;
}

.identity-form .e-input {
    width: 100%;
}

.identity-actions {
    margin-top: 1.5rem;
}

.identity-actions .e-btn {
    min-width: 120px;
}

.identity-field-hint {
    margin-top: 0.4rem;
    color: #6c757d;
    font-size: 0.8rem;
}

.identity-field-success {
    color: #198754;
}


/* ==========================================
   3. Formuliervalidatie
   ========================================== */

.identity-form .text-danger,
.identity-form .field-validation-error {
    display: block;
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.identity-form .field-validation-valid {
    display: none;
}

.identity-form .e-input.input-validation-error,
.identity-form .e-input.e-error {
    border-color: #dc3545;
}

.identity-form .e-input.input-validation-error:focus,
.identity-form .e-input.e-error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15);
    outline: none;
}

.identity-form .validation-summary-errors {
    color: #dc3545;
    margin-bottom: 1rem;
}


/* ==========================================
   4. Links
   ========================================== */

.identity-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.identity-links a {
    color: var(--bs-primary, #0d6efd);
    text-decoration: none;
    font-size: 0.875rem;
}

.identity-links a:hover {
    text-decoration: underline;
}


/* ==========================================
   5. Status- en waarschuwingsmeldingen
   ========================================== */

.identity-message {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
}

.identity-message p {
    margin: 0;
}

.identity-message-icon {
    margin-bottom: 0.5rem;
    color: #dc3545;
    font-size: 1.25rem;
}

.identity-message-success {
    background-color: #d1e7dd;
    border-color: #a3cfbb;
    color: #0a3622;
}

.identity-message-error {
    background-color: #f8d7da;
    border-color: #f1aeb5;
    color: #842029;
}

.identity-message-info {
    background-color: #cff4fc;
    border-color: #9eeaf9;
    color: #055160;
}

.identity-message-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

.identity-message-warning a,
.identity-manage-security .identity-message a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.identity-message-warning a:hover,
.identity-manage-security .identity-message a:hover {
    text-decoration: none;
}


/* ==========================================
   6. Sluitbare statusmeldingen
   ========================================== */

.identity-message-dismissible {
    position: relative;
    padding-right: 2.5rem;
}

.identity-message-close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.65;
}

.identity-message-close:hover {
    opacity: 1;
}

.identity-message-close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 2px;
}


/* ==========================================
   7. Accountbeheer layout
   ========================================== */

.identity-manage {
    width: 100%;
    max-width: 1000px;
}

.identity-manage-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.identity-manage-nav,
.identity-manage-content {
    min-width: 0;
}

/* Binnen accountbeheer mag het formulier
   de volledige beschikbare breedte gebruiken. */
.identity-manage-content .identity-form {
    max-width: 100%;
}


/* ==========================================
   8. Accountbeheer navigatie
   ========================================== */

.identity-manage-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.identity-manage-nav .nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.identity-manage-nav .nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    color: #343a40;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.identity-manage-nav .nav-link:hover {
    background-color: #f1f3f5;
    color: #212529;
}

.identity-manage-nav .nav-link.active {
    background-color: #e9ecef;
    color: #0d6efd;
    font-weight: 600;
    border-left: 3px solid #0d6efd;
}

.identity-manage-nav .nav-link:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}


/* ==========================================
   9. E-mailadres en verificatiestatus
   ========================================== */

.identity-email-field {
    position: relative;
}

.identity-email-field .e-input {
    width: 100%;
}

.identity-email-field .e-input {
    padding-right: 2.5rem;
}

.identity-email-verified {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    color: #198754;
    font-size: 1.25rem;
    font-weight: 700;
    pointer-events: none;
}


/* ==========================================
   10. Authenticator configuratie
   ========================================== */

.identity-authenticator {
    width: 100%;
    max-width: 650px;
}

.identity-steps {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.identity-step {
    padding-left: 0.5rem;
    margin-bottom: 2rem;
}

.identity-step::marker {
    color: #0d6efd;
    font-weight: 600;
}

.identity-step-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.identity-step p {
    margin-bottom: 1rem;
}

.identity-app-list {
    margin-bottom: 1rem;
    padding-left: 1.25rem;
}

.identity-app-list li {
    margin-bottom: 0.5rem;
}


/* ==========================================
   11. QR-code en configuratiesleutel
   ========================================== */

.identity-qr-container {
    display: inline-block;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.identity-qr-container #qrCode img,
.identity-qr-container #qrCode canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.identity-shared-key {
    display: inline-block;
    max-width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.identity-shared-key code {
    font-size: 1rem;
    color: #343a40;
    overflow-wrap: anywhere;
    user-select: all;
}


/* ==========================================
   12. Externe aanmeldingen
   ========================================== */

.identity-external-logins-list {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.identity-external-login-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
}

.identity-external-login-item + .identity-external-login-item {
    border-top: 1px solid #dee2e6;
}

.identity-external-login-name {
    font-weight: 500;
}

.identity-external-login-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}


/* ==========================================
   13. Herstelcodes
   ========================================== */

.identity-recovery-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1.25rem;
    margin: 1.5rem 0;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.identity-recovery-code {
    display: block;
    padding: 0.75rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #343a40;
    font-family: monospace;
    font-size: 0.95rem;
    text-align: center;
    overflow-wrap: anywhere;
    user-select: all;
}


/* ==========================================
   14. Beveiligingsinstellingen
   ========================================== */

.identity-manage-security {
    width: 100%;
    max-width: 650px;
}

.identity-security-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 2rem;
}

.identity-security-actions form {
    margin: 0;
}

.identity-security-actions .e-btn {
    white-space: normal;
    text-align: center;
}


/* ==========================================
   15. Responsive layout
   ========================================== */

@media (max-width: 768px) {

    .identity-manage-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .identity-manage-nav {
        border-bottom: 1px solid #dee2e6;
        padding-bottom: 1rem;
    }
}

@media (max-width: 576px) {

    .identity-external-login-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .identity-security-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .identity-security-actions form,
    .identity-security-actions .e-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {

    .identity-recovery-codes {
        grid-template-columns: 1fr;
    }
}
