/*
 * Registration page styles
 * Page: resources/views/registration.blade.php
 * NEVER hardcode colors - use var(--site-*) variables.
 *
 * Layout: hero + 4-step process + embedded opvanguren form + FAQ.
 * The form itself is rendered into #pb-form by an external script —
 * we style that container so it visually integrates with the site.
 */

/* ========== HERO ========== */
.reg-hero {
    background-color: var(--site-hero-bg);
    padding: 80px 5% 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.reg-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    left: -10%;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: var(--site-secondary);
    opacity: 0.06;
    pointer-events: none;
}

.reg-hero-content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.reg-hero-content h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--site-primary);
    margin-bottom: 12px;
}

.reg-hero-content p {
    font-size: 1.15rem;
    color: var(--site-text);
    opacity: 0.8;
}

/* ========== SECTIONS ========== */
.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.reg-form-section,
.reg-faq {
    padding: 70px 0;
}

.reg-faq {
    background-color: var(--site-hero-bg);
}

/* ============================================================
 * EMBEDDED OPVANGUREN FORM
 * ------------------------------------------------------------
 * Auto-loaded host container (.reg-embed-host) where the
 * opvanguren script mounts <div id="pb-form">.
 * ============================================================ */

/* ---- Host & skeleton ---- */
.reg-embed-host {
    margin-top: 30px;
    min-height: 240px;
    position: relative;
}

.reg-embed-skeleton {
    background: var(--site-card-bg);
    border: 1px dashed var(--site-card-border);
    border-radius: 16px;
    padding: 60px 30px;
    text-align: center;
    color: var(--site-text);
    opacity: 0.85;
}

.reg-embed-skeleton p {
    margin: 16px 0 0;
    font-size: 0.95rem;
}

.reg-embed-spinner {
    display: inline-block;
    width: 42px;
    height: 42px;
    border: 3px solid var(--site-card-border);
    border-top-color: var(--site-primary);
    border-radius: 50%;
    animation: reg-spin 0.9s linear infinite;
}

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

/* ---- Failed-to-load fallback ---- */
.reg-embed-failed {
    background: var(--site-card-bg);
    border: 2px solid var(--site-accent);
    border-radius: 16px;
    padding: 30px;
    margin-top: 24px;
    text-align: center;
}

.reg-embed-failed h3 {
    color: var(--site-accent);
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.reg-embed-failed p {
    margin: 0 0 18px;
    font-size: 0.95rem;
    color: var(--site-text);
    opacity: 0.9;
}

.reg-embed-failed .btn {
    background: var(--site-btn-bg);
    color: var(--site-btn-text);
    padding: 12px 26px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 700;
}

/* ============================================================
 * OPVANGUREN FORM (#pb-form) — visual harmonisation
 * ------------------------------------------------------------
 * The external script renders raw form HTML inside #pb-form.
 * These rules graft our typography, spacing and colour onto
 * its markup without overriding its functional behaviour.
 * Class names used by the bundle: pb-field-group, pb-spacer,
 * pb-form-fields, optgroup.
 * ============================================================ */

#pb-form {
    background: var(--site-card-bg);
    border: 1px solid var(--site-card-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--site-shadow-sm);
    color: var(--site-text);
    font-family: inherit;
}

#pb-form form {
    margin: 0;
}

#pb-form h1,
#pb-form h2,
#pb-form h3 {
    color: var(--site-primary);
    font-weight: 700;
    margin-top: 0;
}

#pb-form .pb-form-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

#pb-form .pb-field-group {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-start;
}

#pb-form .pb-field-group > span {
    flex: 1 1 240px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#pb-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--site-text);
    display: block;
}

#pb-form input[type="text"],
#pb-form input[type="email"],
#pb-form input[type="tel"],
#pb-form input[type="number"],
#pb-form input[type="date"],
#pb-form input.text,
#pb-form input.short-text,
#pb-form input.date,
#pb-form select,
#pb-form textarea {
    padding: 12px 16px;
    border: 1px solid var(--site-card-border);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--site-text);
    background: var(--site-bg);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    width: 100%;
    box-sizing: border-box;
}

#pb-form input[type="text"]:focus,
#pb-form input[type="email"]:focus,
#pb-form input[type="tel"]:focus,
#pb-form input[type="number"]:focus,
#pb-form input[type="date"]:focus,
#pb-form input.text:focus,
#pb-form input.short-text:focus,
#pb-form input.date:focus,
#pb-form select:focus,
#pb-form textarea:focus {
    outline: none;
    border-color: var(--site-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

#pb-form input[type="radio"],
#pb-form input[type="checkbox"] {
    margin-right: 6px;
    accent-color: var(--site-primary);
}

[dir="rtl"] #pb-form input[type="radio"],
[dir="rtl"] #pb-form input[type="checkbox"] {
    margin-right: 0;
    margin-left: 6px;
}

#pb-form .optgroup {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

#pb-form .optgroup label {
    font-weight: 500;
    margin-right: 14px;
}

[dir="rtl"] #pb-form .optgroup label {
    margin-right: 0;
    margin-left: 14px;
}

#pb-form textarea {
    min-height: 100px;
    resize: vertical;
}

#pb-form .pb-spacer {
    height: 4px;
}

#pb-form button,
#pb-form input[type="submit"] {
    background: var(--site-btn-bg);
    color: var(--site-btn-text);
    padding: 14px 38px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    font-family: inherit;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    margin-top: 12px;
}

#pb-form button:hover,
#pb-form input[type="submit"]:hover {
    background: var(--site-btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

#pb-form button:disabled,
#pb-form input[type="submit"]:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* opvanguren's own inline error/success markup */
#pb-form .error-message,
#pb-form ul li {
    color: var(--site-accent);
    font-size: 0.9rem;
}

#pb-form a {
    color: var(--site-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ========== FAQ ========== */
.faq-list {
    max-width: 800px;
    margin: 40px auto 0;
}

.faq-item {
    background: var(--site-card-bg);
    border: 1px solid var(--site-card-border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 18px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--site-text);
    text-align: left;
    transition: color 0.3s ease;
}

[dir="rtl"] .faq-question {
    text-align: right;
}

.faq-question:hover {
    color: var(--site-primary);
}

.faq-toggle {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--site-primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 16px;
}

[dir="rtl"] .faq-toggle {
    margin-left: 0;
    margin-right: 16px;
}

.faq-item.open .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 24px;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 24px 20px;
}

.faq-answer p {
    font-size: 0.95rem;
    color: var(--site-text);
    opacity: 0.85;
    line-height: 1.7;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 700px) {
    .reg-hero-content h1 {
        font-size: 2rem;
    }

    .reg-embed-notice {
        padding: 24px 22px;
    }

    #pb-form {
        padding: 26px 20px;
    }

    #pb-form .pb-field-group > span {
        flex: 1 1 100%;
    }

    .faq-question {
        font-size: 0.92rem;
        padding: 14px 18px;
    }
}

/* ============================================================
 * WELCOME CARD — warm intro that replaces the old 4-step strip.
 * ============================================================ */
.reg-welcome {
    padding: 60px 0;
    background: var(--site-hero-bg);
}

.reg-welcome-card {
    max-width: 760px;
    margin: 0 auto;
    background: var(--site-card-bg);
    border: 1px solid var(--site-card-border);
    border-radius: var(--site-radius-md, 18px);
    box-shadow: var(--site-shadow-sm);
    padding: 48px 44px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.reg-welcome-card::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: var(--site-secondary);
    opacity: 0.07;
    pointer-events: none;
}

[dir="rtl"] .reg-welcome-card::after {
    right: auto;
    left: -60px;
}

.reg-welcome-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--site-gradient-warm, var(--site-secondary));
    color: var(--site-btn-text, #fff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    box-shadow: var(--site-shadow-sm);
}

.reg-welcome-icon .icon-svg {
    width: 32px;
    height: 32px;
}

.reg-welcome-card h2 {
    color: var(--site-primary);
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 14px;
    position: relative;
    z-index: 1;
}

.reg-welcome-card p {
    color: var(--site-text);
    font-size: 1.05rem;
    line-height: 1.75;
    opacity: 0.9;
    margin: 0;
    position: relative;
    z-index: 1;
}

@media (max-width: 700px) {
    .reg-welcome { padding: 40px 0; }
    .reg-welcome-card { padding: 36px 24px; }
    .reg-welcome-card h2 { font-size: 1.35rem; }
    .reg-welcome-card p { font-size: 0.98rem; }
}
