/* ============================================
   REGISTRATION FORM — Quran Academy
   Single-page progressive disclosure layout
   ============================================ */

/* --- Base & Container --- */
.reg-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    font-family: 'Poppins', sans-serif;
}

    .reg-container *,
    .reg-container *::before,
    .reg-container *::after {
        box-sizing: border-box;
    }

.reg-page-title {
    text-align: center;
    margin-bottom: 12px;
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 700;
    color: #222;
}

.reg-page-subtitle {
    text-align: center;
    font-size: 15px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 48px;
}

/* --- Sections --- */
.reg-section {
    margin-bottom: 48px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

    .reg-section.is-hidden {
        display: none;
    }

.reg-section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #3db166;
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3db166;
}

/* --- Form Grid --- */
.reg-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

    .reg-row.single {
        flex-direction: column;
    }

.reg-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

    .reg-field label {
        font-size: 13px;
        font-weight: 600;
        color: #333;
        margin-bottom: 6px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

        .reg-field label .req {
            color: #e74c3c;
            margin-left: 2px;
        }

/* --- Inputs --- */
.reg-input,
.reg-select,
.reg-textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    color: #222;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 0;
    outline: none;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

    .reg-input:focus,
    .reg-select:focus,
    .reg-textarea:focus {
        border-color: #222;
    }

    .reg-input.is-invalid,
    .reg-select.is-invalid,
    .reg-textarea.is-invalid {
        border-color: #e74c3c;
    }

.reg-textarea {
    resize: vertical;
    min-height: 90px;
}

.reg-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.reg-helper {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    font-style: italic;
}

.reg-error {
    font-size: 12px;
    color: #e74c3c;
    margin-top: 4px;
    display: none;
}

    .reg-error.is-visible {
        display: block;
    }

/* --- Selectable Cards (Gender, Course, Timing, Location, Package) --- */
.reg-cards {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.reg-card {
    flex: 1;
    min-width: 160px;
    padding: 20px 16px;
    border: 2px solid #ddd;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    text-align: center;
    position: relative;
    user-select: none;
}

    .reg-card:hover {
        border-color: #aaa;
    }

    .reg-card.is-selected {
        border-color: #3db166;
        background-color: #f0faf4;
    }

        .reg-card.is-selected::after {
            content: '✓';
            position: absolute;
            top: 8px;
            right: 10px;
            font-size: 14px;
            font-weight: 700;
            color: #3db166;
        }

    .reg-card.is-disabled {
        opacity: 0.45;
        cursor: not-allowed;
        pointer-events: none;
    }

    .reg-card .card-title {
        font-size: 15px;
        font-weight: 700;
        color: #222;
        margin-bottom: 4px;
    }

    .reg-card .card-detail {
        font-size: 12px;
        color: #666;
        line-height: 1.5;
    }

    .reg-card .card-badge {
        display: inline-block;
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: #999;
        background: #f0f0f0;
        padding: 3px 8px;
        margin-top: 8px;
    }

        .reg-card .card-badge.disabled-reason {
            color: #c0392b;
            background: #fdecea;
        }

/* --- Google Maps Link --- */
.reg-map-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #3db166;
    text-decoration: none;
    margin-top: 10px;
    padding: 4px 0;
    letter-spacing: 0.3px;
    transition: color 0.15s ease;
}

    .reg-map-link:hover {
        color: #2d8a4e;
        text-decoration: underline;
    }

/* --- Course Cards (larger) --- */
.reg-cards.course-cards {
    gap: 14px;
}

    .reg-cards.course-cards .reg-card {
        min-width: 200px;
        padding: 24px 18px;
    }

        .reg-cards.course-cards .reg-card .card-title {
            font-size: 16px;
            margin-bottom: 8px;
        }

/* --- Sub-option panels (timing, location, packages) --- */
.reg-sub-panel {
    margin-top: 20px;
    padding: 20px;
    background: #fafafa;
    border: 1px solid #eee;
    display: none;
}

    .reg-sub-panel.is-visible {
        display: block;
    }

/* Inner sub-panels (e.g. timing/location within Fehm, confirm buttons) */
.reg-sub-inner {
    display: none;
}

    .reg-sub-inner.is-visible {
        display: block;
    }

.reg-sub-panel .sub-panel-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #555;
    margin-bottom: 12px;
}

/* --- Read-Only Confirmation Card --- */
.reg-readonly-card {
    padding: 20px;
    background: #f7f7f7;
    border: 2px solid #ddd;
    text-align: center;
    margin-top: 16px;
}

    .reg-readonly-card .readonly-title {
        font-size: 13px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: #888;
        margin-bottom: 8px;
    }

    .reg-readonly-card .readonly-value {
        font-size: 15px;
        font-weight: 600;
        color: #222;
        line-height: 1.6;
    }

/* --- Review Summary (Section 4) --- */
.reg-summary {
    padding: 28px 24px;
    background: #f9f9f9;
    border: 2px solid #ddd;
    margin-bottom: 28px;
}

    .reg-summary .summary-line {
        font-size: 15px;
        color: #333;
        line-height: 1.8;
    }

        .reg-summary .summary-line strong {
            color: #222;
        }

/* --- Submit Button --- */
.reg-submit-wrap {
    text-align: center;
}

.reg-submit-btn {
    display: inline-block;
    padding: 16px 64px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    background: #3db166;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .reg-submit-btn:hover {
        background: #35a05b;
    }

    .reg-submit-btn:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

/* --- Continue Button (per-section) --- */
.reg-continue-wrap {
    text-align: center;
    margin-top: 28px;
}

.reg-continue-btn {
    display: inline-block;
    padding: 12px 48px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #3db166;
    background: transparent;
    border: 2px solid #3db166;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

    .reg-continue-btn:hover {
        background: #3db166;
        color: #fff;
    }

/* --- Success Message --- */
.reg-success {
    display: none;
    text-align: center;
    padding: 60px 20px;
}

    .reg-success.is-visible {
        display: block;
    }

    .reg-success h3 {
        font-family: 'Playfair Display', serif;
        font-size: 32px;
        color: #222;
        margin-bottom: 12px;
    }

    .reg-success p {
        font-size: 15px;
        color: #777;
        text-transform: uppercase;
        letter-spacing: 1.5px;
    }

/* --- Responsive --- */
@media screen and (max-width: 600px) {
    .reg-container {
        padding: 24px 14px 40px;
    }

    .reg-page-title {
        font-size: 28px;
    }

    .reg-row {
        flex-direction: column;
        gap: 0;
    }

    .reg-field {
        margin-bottom: 16px;
    }

    .reg-cards {
        flex-direction: column;
    }

    .reg-card {
        min-width: 100%;
    }

    .reg-submit-btn {
        width: 100%;
        padding: 16px 20px;
    }

    .reg-continue-btn {
        width: 100%;
        padding: 14px 20px;
    }
}