/* RegistrationForm module styles — all selectors scoped to .registration-wizard */

.registration-wizard { max-width: 760px; margin: 0 auto; font-family: inherit; }

/* Progress bar */
.registration-progress { margin-bottom: 1.5em; }
.registration-step-label { font-size: 0.9em; color: #555; display: block; margin-bottom: 0.4em; }
.registration-progress-bar { background: #e0e0e0; border-radius: 4px; height: 8px; }
.registration-progress-fill { background: #2c6fad; border-radius: 4px; height: 8px; transition: width 0.3s ease; }

/* Error panel */
.registration-errors { background: #fdf0f0; border: 1px solid #e0b4b4; border-radius: 4px; padding: 1em 1.2em; margin-bottom: 1.2em; color: #900; }
.registration-errors ul { margin: 0.4em 0 0 1.2em; padding: 0; }

/* Success panel */
.registration-success-panel { background: #f0fdf4; border: 1px solid #a7d7b0; border-radius: 4px; padding: 1.2em; color: #1a5e2c; font-size: 1.1em; }

/* Page content */
.registration-page { padding: 0.5em 0; }
.registration-section-title { font-size: 1.2em; font-weight: bold; border-bottom: 2px solid #2c6fad; padding-bottom: 0.3em; margin: 1.2em 0 0.8em; color: #2c6fad; }
.registration-intro { background: #f7f9fc; border-left: 4px solid #2c6fad; padding: 0.8em 1em; margin-bottom: 1.2em; font-size: 0.95em; }
.registration-intro p { margin: 0.4em 0; }
.registration-notice { font-weight: bold; margin-top: 0.8em; }

/* Fields */
.registration-field { margin-bottom: 1em; }
.registration-field > label { display: block; font-weight: 600; margin-bottom: 0.3em; }
.req { color: #c00; margin-left: 2px; }

/* Inputs */
.registration-input { width: 100%; max-width: 480px; padding: 0.4em 0.6em; border: 1px solid #bbb; border-radius: 3px; font-size: 1em; box-sizing: border-box; }
.registration-input:focus { border-color: #2c6fad; outline: none; box-shadow: 0 0 0 2px rgba(44,111,173,0.2); }
.registration-input-short { max-width: 200px; }
.registration-input-date  { max-width: 160px; }
textarea.registration-input { resize: vertical; }

/* Read-only labels (auto-populated fields) */
.registration-readonly { display: inline-block; padding: 0.4em 0.6em; background: #f4f4f4; border: 1px solid #ddd; border-radius: 3px; min-width: 200px; }

/* Autofilled read-only date inputs */
.registration-input-autofill {
    background: #dcdcdc;
    color: #555;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

/* Review page */
.registration-review-section { margin-bottom: 1.8em; }
.registration-review-header {
    background: #1a4d80;
    color: #fff;
    font-weight: 700;
    font-size: 1.05em;
    padding: 0.75em 1.1em;
    border-radius: 4px 4px 0 0;
    letter-spacing: 0.02em;
}
.registration-review-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #c5cedf;
    border-top: none;
    border-radius: 0 0 4px 4px;
    table-layout: fixed;
}
.registration-review-table td {
    padding: 0.65em 1em;
    border-bottom: 1px solid #e4e9f2;
    font-size: 0.9em;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.registration-review-table tr:nth-child(even) td { background: #f8fafc; }
.registration-review-table tr:last-child td { border-bottom: none; }
.registration-review-label {
    width: 42%;
    font-weight: 600;
    color: #374151;
    background: #f0f4fa;
}
.registration-review-table tr:nth-child(even) .registration-review-label { background: #e8edf7; }
.registration-review-subheader td {
    background: #dae4f2 !important;
    color: #1a3d6b;
    font-weight: 700;
    font-size: 0.8em;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.45em 1em;
}

/* Checkbox */
.registration-checkbox { font-weight: normal; }
.registration-checkbox input[type=checkbox] { margin-right: 0.4em; }

/* Radio button list */
.registration-radio table { border: none; }
.registration-radio td { padding: 0 1em 0 0; white-space: nowrap; }
.registration-radio input[type=radio] { margin-right: 0.3em; }
.registration-radio label { display: inline; font-weight: normal; margin-bottom: 0; }

/* Conditional panels */
.registration-conditional { background: #f7f9fc; border-left: 3px solid #2c6fad; padding: 0.7em 1em; margin: 0.5em 0 0.8em; border-radius: 0 3px 3px 0; }

/* Question blocks */
.registration-question-block { border: 1px solid #e8e8e8; border-radius: 4px; padding: 0.8em 1em; margin-bottom: 1em; background: #fafafa; }

/* Content placeholders (childcare declaration) */
.registration-content-placeholder { background: #fffbec; border: 1px dashed #e0b060; border-radius: 4px; padding: 0.8em 1em; margin-bottom: 1em; color: #7a5a00; font-style: italic; }

/* Sub-form (Section 4 PoI) */
.registration-subform { background: #f7f9fc; border: 1px solid #cdd; border-radius: 4px; padding: 1em; margin-top: 0.8em; }
.registration-subform h3 { margin-top: 0; }
.registration-subform-actions { margin-top: 0.8em; }
.registration-subform-actions .registration-btn,
.registration-subform-actions .registration-btn-secondary { margin-right: 0.5em; }
.registration-file-upload { display: block; margin-top: 0.3em; }

/* Grid (Section 4 PoI list, admin) */
.registration-grid { width: 100%; border-collapse: collapse; margin-bottom: 0.8em; }
.registration-grid th { background: #2c6fad; color: #fff; padding: 0.5em 0.7em; text-align: left; font-size: 0.9em; }
.registration-grid td { padding: 0.45em 0.7em; border-bottom: 1px solid #eee; vertical-align: top; }
.registration-grid tr:nth-child(even) td { background: #f5f7fa; }

/* Buttons */
.registration-btn,
.registration-btn-secondary,
.registration-btn-submit { display: inline-block; padding: 0.5em 1.2em; border-radius: 3px; border: none; cursor: pointer; font-size: 1em; }
.registration-btn         { background: #2c6fad; color: #fff; }
.registration-btn:hover   { background: #245d95; }
.registration-btn-secondary         { background: #e0e0e0; color: #333; }
.registration-btn-secondary:hover   { background: #ccc; }
.registration-btn-submit            { background: #2e8b57; color: #fff; }
.registration-btn-submit:hover      { background: #256f45; }
.registration-btn-link       { background: none; border: none; color: #c00;     cursor: pointer; text-decoration: underline; padding: 0; font-size: 0.9em; }
.registration-btn-link-edit  { background: none; border: none; color: #2c6fad; cursor: pointer; text-decoration: underline; padding: 0; font-size: 0.9em; margin-right: 0.6em; }

/* Navigation */
.registration-nav { margin-top: 1.5em; padding-top: 1em; border-top: 1px solid #e0e0e0; display: flex; gap: 0.7em; align-items: center; }

/* Admin */
.registration-admin h2 { color: #2c6fad; margin-bottom: 0.8em; }

/* Admin list table */
.ra-table { font-size: 0.9em; }
.ra-table th { background: #2c6fad; color: #e8f0ff !important; padding: 0.5em 0.75em; white-space: nowrap; }
.ra-table th a,
.ra-table th a:link,
.ra-table th a:visited,
.ra-table th a:hover,
.ra-table th a:active,
.ra-table th a:focus { color: #e8f0ff !important; text-decoration: none; }
.ra-table th a:hover { text-decoration: underline; }
.ra-table td { padding: 0.45em 0.75em; vertical-align: middle; }
.ra-table tr:hover td { background: #eef3fa; }
.ra-view-link { color: #2c6fad; font-size: 0.8em; border: 1px solid #2c6fad; padding: 2px 9px; border-radius: 3px; text-decoration: none; white-space: nowrap; }
.ra-view-link:hover { background: #2c6fad; color: #fff !important; text-decoration: none; }
.ra-delete-link { color: #b00020; border-color: #b00020; }
.ra-delete-link:hover { background: #b00020 !important; color: #fff !important; }

/* Admin back link */
.ra-back-link { display: inline-block; margin-bottom: 1.2em; color: #2c6fad; font-size: 0.875em; font-weight: 600; text-decoration: none; }
.ra-back-link:hover { text-decoration: underline; }

/* Admin detail */
.ra-detail-header { border-bottom: 2px solid #2c6fad; margin-bottom: 1.5em; padding-bottom: 0.7em; }
.ra-detail-header h2 { margin: 0 0 0.2em; font-size: 1.5em; color: #1a1d23; }
.ra-submitted { color: #555; font-size: 0.875em; margin: 0; }
.ra-section { margin-bottom: 1.5em; }
.ra-section-header { background: #2c6fad; color: #fff; font-weight: 700; font-size: 0.875em; padding: 0.5em 0.85em; border-radius: 3px 3px 0 0; }
.ra-section-table { width: 100%; border-collapse: collapse; border: 1px solid #dde3ef; border-top: none; border-radius: 0 0 3px 3px; }
.ra-section-table td { padding: 0.45em 0.85em; border-bottom: 1px solid #e8ecf3; font-size: 0.875em; vertical-align: top; }
.ra-section-table tr:last-child td { border-bottom: none; }
.ra-label { width: 260px; font-weight: 600; color: #4a5568; background: #f7f9fc; white-space: nowrap; }
.ra-subheader { background: #e8eef7; color: #2c6fad; font-weight: 700; font-size: 0.8125em; letter-spacing: 0.03em; text-transform: uppercase; }
.ra-empty { color: #bbb; font-style: italic; }
.ra-yes { color: #1a5e2c; font-weight: 700; }
.ra-no  { color: #9a1515; }
.ra-list { margin: 0.2em 0 0; padding-left: 1.2em; }
.ra-list li { margin-bottom: 0.15em; }

/* Public URL configuration bar */
.ra-public-url-bar { display: flex; align-items: center; gap: 0.6em; background: #f7f9fc; border: 1px solid #c5cedf; border-radius: 4px; padding: 0.7em 1em; margin-bottom: 1.5em; flex-wrap: wrap; }
.ra-public-url-label { font-weight: 600; white-space: nowrap; font-size: 0.9em; }
.ra-public-url-input { flex: 1; min-width: 200px; }
.ra-saved-msg { color: #1a5e2c; }

/* Admin list — panel sections (invitations + registrations) */
.ra-admin-panel { margin-bottom: 2.5em; }
.ra-admin-panel-heading { display: flex; align-items: center; gap: 1em; margin-bottom: 0.8em; }
.ra-admin-panel-heading h2 { margin: 0; color: #2c6fad; }

/* Create invitation form */
.ra-create-form { background: #f7f9fc; border: 1px solid #c5cedf; border-radius: 4px; padding: 1.2em 1.4em; margin-bottom: 1em; }
.ra-create-form h3 { margin: 0 0 1em; color: #2c6fad; font-size: 1em; }
.ra-optional { color: #777; font-weight: normal; font-size: 0.875em; }
.ra-create-actions { margin-top: 0.8em; display: flex; gap: 0.6em; }

/* Invitation link display */
.ra-invite-link { background: #f0fdf4; border: 1px solid #a7d7b0; border-radius: 4px; padding: 1em 1.2em; margin-bottom: 1em; }
.ra-invite-link p { margin: 0 0 0.5em; }
.ra-invite-link-input { width: 100%; padding: 0.4em 0.6em; border: 1px solid #bbb; border-radius: 3px; font-family: monospace; font-size: 0.9em; box-sizing: border-box; background: #fff; }
.ra-hint { color: #666; font-size: 0.8em; margin: 0.4em 0 0; }

/* Public form — access control panels */
.registration-access-panel { max-width: 540px; margin: 2em auto; background: #fdf0f0; border: 1px solid #e0b4b4; border-radius: 4px; padding: 1.2em 1.4em; color: #600; }
.registration-access-panel p { margin: 0.3em 0; }
.registration-access-panel p:first-child { font-size: 1.05em; }
