/**
 * Magic Portaal – formulierstijlen
 *
 * Volledig eigen klassen (.mp-*).
 * Stijl is gebaseerd op de Clean Login plugin + de subsite-thema-overrides
 * van Vormportaal, samengesmolten tot één zelfstandig bestand.
 * Geen verwijzing naar Clean Login.
 */

/* ── Container ──────────────────────────────────────────────────── */

.mp-container {
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    /* Thema-override: open, randloos, volle breedte */
    max-width: 100%;
    padding: 10px 0 0 0;
    border-radius: 0;
    border: 0;
    box-shadow: none;
}


/* ── Formulier ──────────────────────────────────────────────────── */

.mp-form {
    border-color: inherit;
    display: block;
    position: relative;
    width: 100%;
}

.mp-form fieldset {
    border-width: 0;
    border-color: inherit;
    padding: 0;
    margin: 0;
}

.mp-form button,
.mp-form input,
.mp-form select,
.mp-form textarea {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* ── Velden ─────────────────────────────────────────────────────── */

.mp-field {
    margin-bottom: 20px;
}

/* ── Labels ─────────────────────────────────────────────────────── */

.mp-form label {
    display: none;
}

/* ── Tekstvelden & e-mailinput ──────────────────────────────────── */

.mp-form input[type="text"],
.mp-form input[type="password"],
.mp-form input[type="email"],
.mp-form input[type="tel"] {
    font-family: inherit !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #ccc !important;
    border-radius: 0 !important;
    padding: 0 !important;
    width: 100%;
    height: 45px;
    font-size: 18px !important;
    color: #333 !important;
    box-shadow: none !important;
    background-image: none !important;
    outline: none !important;
    box-sizing: border-box;
}

.mp-form input[type="text"]:focus,
.mp-form input[type="password"]:focus,
.mp-form input[type="email"]:focus,
.mp-form input[type="tel"]:focus {
    outline: none !important;
    border-bottom: 2px solid #000 !important;
}

.mp-form input::placeholder {
    font-family: inherit !important;
    color: #aaa !important;
    opacity: 1 !important;
}

/* ── Submitknop ─────────────────────────────────────────────────── */

.mp-form input[type="submit"] {
    font-family: inherit;
    font-size: var(--wp--preset--font-size--medium, 16px);
    font-weight: 400;
    line-height: 1;
    width: auto;
    display: inline-block;
    margin: 10px 0;
    background-color: #000;
    color: #fff;
    padding: 13px 24px;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    margin-bottom: 20px;
}

.mp-form input[type="submit"]:hover {
    background-color: #333;
}

/* ── Meldingen (succes / fout) ───────────────────────────────────── */

.mp-notification {
    clear: both;
    border: 1px solid;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, .25);
    -webkit-animation: mp-fade-out 0s ease-in 5s forwards;
    animation:         mp-fade-out 0s ease-in 5s forwards;
    -webkit-animation-fill-mode: forwards;
    animation-fill-mode: forwards;
}

/* Permanente melding (na formulierverwerking) */
.mp-notification.mp-permanent {
    -webkit-animation: none;
    animation: none;
}

@keyframes mp-fade-out {
    to {
        border: 0;
        padding: 0;
        width: 0;
        height: 0;
        overflow: hidden;
    }
}

@-webkit-keyframes mp-fade-out {
    to {
        border: 0;
        padding: 0;
        width: 0;
        height: 0;
        visibility: hidden;
    }
}

.mp-notification > p {
    margin: 0;
}

.mp-notification.mp-success {
    background: #F0F2DD;
    border-color: #24890D;
    color: #24890D;
}

.mp-notification.mp-error {
    background: #FFE7E7;
    border-color: #FF5656;
    color: #FF5656;
}

/* ── Beschrijvingstekst ─────────────────────────────────────────── */

.mp-form p.mp-description {
    color: #7c7c7c;
    font-size: 0.85714286rem;
    font-style: italic;
}

/* ── Links onderaan ─────────────────────────────────────────────── */

.mp-form-bottom {
    padding-top: 6px;
    height: 24px;
}

.mp-form-bottom a {
    text-decoration: none;
}

.mp-form-bottom a::before {
    content: "> ";
    font-size: var(--wp--preset--font-size--small, 13px);
    margin-right: 6px;
    display: inline-block;
}

/* ── Ingelogde staat ────────────────────────────────────────────── */

.mp-logged-in {
    text-align: center;
    padding: 30px 0;
}

.mp-welcome {
    font-size: 16px;
    margin-bottom: 16px;
}

.mp-logout-btn {
    display: inline-block;
    font-family: inherit;
    font-size: var(--wp--preset--font-size--medium, 16px);
    font-weight: 400;
    line-height: 1;
    background-color: #000;
    color: #fff;
    padding: 13px 24px;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s;
}

.mp-logout-btn:hover {
    background-color: #333;
    color: #fff;
}

/* ── Succesboodschap: gewone zwarte tekst ──────────────────────── */
.mp-success-text {
    color: #000;
    font-size: 16px;
    margin: 0 0 16px;
    padding: 0;
    background: none;
    border: none;
}




/* ── Profielformulier ───────────────────────────────────────────── */

.mp-profile-row {
    display: flex;
    gap: 20px;
}

.mp-field-half {
    flex: 1;
    min-width: 0;
}

@media ( max-width: 600px ) {
    .mp-profile-row {
        flex-direction: column;
        gap: 0;
    }
}

/* ── Marges kopteksten en knop ──────────────────────────────────── */

/* Geen bovenmarge op kopteksten in het formulier */
.mp-container h1 {
    margin-top: 0;
}

/* Geen ondermarge na de submit-knop (laatste veld) */
.mp-container .mp-field:last-child {
    margin-bottom: 0;
}

.mp-container .mp-field:last-child input[type="submit"] {
    margin-bottom: 0;
}

/* ── Wachtscherm (polling) ──────────────────────────────────────── */

.mp-waiting {
    /* Neemt automatisch plek van succesvolle tekst over; behoudt
       dezelfde typografische kadering als de succes-state. */
}

.mp-waiting-status {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.mp-waiting-text {
    flex: 1;
}

.mp-waiting-noscript {
    margin-top: 14px;
    font-size: 14px;
    color: #666;
}

.mp-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: mp-spin 0.8s linear infinite;
    flex-shrink: 0;
    opacity: 0.7;
}

@keyframes mp-spin {
    to { transform: rotate(360deg); }
}

@media ( prefers-reduced-motion: reduce ) {
    .mp-spinner { animation-duration: 2s; }
}

/* ── Code-invoer: 6 losse hokjes ────────────────────────────────── */

.mp-code-form {
    margin-top: 18px;
}

.mp-code-field {
    margin-bottom: 14px;
}

/* Rij van 6 hokjes — gecentreerd, andere teksten blijven links uitgelijnd */
.mp-otp-cells {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}

/* Elk hokje. Selector heeft hogere specificity dan .mp-form input[type="text"]
   (0,3,1 vs 0,1,1) en gebruikt ook !important — overschrijft de algemene
   onderstreepte-stijl die anders zou winnen. */
.mp-form .mp-otp-cells input.mp-otp-cell {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 60px !important;
    flex: 0 0 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #ccc !important;
    border-radius: 10px !important;
    background: #fff !important;
    background-image: none !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    font-size: 24px !important;
    line-height: 1 !important;
    color: #333 !important;
    text-align: center !important;
    box-shadow: none !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.15s;
    border-bottom: 1px solid #ccc !important;
}

.mp-form .mp-otp-cells input.mp-otp-cell:focus {
    border: 2px solid #000 !important;
    border-bottom: 2px solid #000 !important;
    outline: none !important;
}

.mp-form .mp-otp-cells input.mp-otp-cell.mp-otp-filled {
    border-color: #888 !important;
    border-bottom-color: #888 !important;
}

/* Verborgen veld dat de volledige 6-cijferige code doorgeeft aan PHP */
.mp-otp-hidden {
    display: none !important;
}

/* Inlog-knop onder de hokjes ook centreren (alleen in het code-formulier) */
.mp-code-form .mp-code-submit {
    margin-bottom: 18px;
    text-align: center;
}

/* ── Deze computer vertrouwen ────────────────────────────────────── */

.mp-remember {
    margin-bottom: 10px;
    text-align: center;
}

.mp-remember-label {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.mp-remember-label input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    flex: 0 0 16px !important;
    border: 1px solid #ccc !important;
    border-bottom: 1px solid #ccc !important;
    border-radius: 4px !important;
    background: #fff !important;
    cursor: pointer;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    accent-color: #000;
}

/* ── Geen code ontvangen? ────────────────────────────────────────── */

.mp-resend {
    margin-top: 14px;
    text-align: center;
}

.mp-resend-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mp-resend-btn:hover {
    color: #000;
}
