/* Showprogramma Inschrijven — WordPress plugin stylesheet */

#sp-inschrijven-app {
    font-family: inherit;
    color: #333;
}

/* ── Loading ─────────────────────────────────────────────────────────────── */
.sp-loading {
    text-align: center;
    padding: 40px 0;
    color: #666;
}

.sp-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #825339;
    border-color: #e0d4c8;
    border-radius: 50%;
    animation: showprogramma-spin 0.8s linear infinite;
    margin-bottom: 12px;
}

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

/* ── Show info banner ────────────────────────────────────────────────────── */
.sp-show-info {
    background: #f7f2ec;
    border-left: 4px solid #825339;
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 0 4px 4px 0;
}

#sp-inschrijven-app h2 {
    font-size: 1.4em;
    margin-top: 0;
}

.sp-show-info h2 {
    margin: 0 0 4px;
    color: #825339;
    font-size: 1.4em;
}

.sp-show-datum {
    margin: 0 0 8px;
    color: #555;
    font-style: italic;
}

.sp-show-tekst {
    margin-top: 10px;
    font-size: 0.95em;
    color: #444;
}

/* ── Step indicator ──────────────────────────────────────────────────────── */
.sp-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 28px;
    padding: 0;
}

.sp-step-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: #eee;
    color: #888;
    font-size: 0.85em;
    font-weight: 500;
    white-space: nowrap;
}

.sp-step-item.active {
    background: #825339;
    color: #fff;
}

.sp-step-item.completed {
    background: #ecddd3;
    color: #5a3520;
}

.sp-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0,0,0,.12);
    font-size: 0.8em;
    font-weight: 700;
    flex-shrink: 0;
}

.sp-step-item.active .sp-step-num   { background: rgba(255,255,255,.25); }
.sp-step-item.completed .sp-step-num { background: #825339; color: #fff; }

/* ── Form sections ───────────────────────────────────────────────────────── */
.sp-step h3 {
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #825339;
    color: #825339;
    font-size: 1.15em;
}

.sp-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 14px;
}

.sp-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
}

/* Column widths (12-column grid) */
.sp-col-2  { flex-basis: calc(2/12 * 100% - 14px);  min-width: 80px; }
.sp-col-3  { flex-basis: calc(3/12 * 100% - 14px);  min-width: 100px; }
.sp-col-4  { flex-basis: calc(4/12 * 100% - 14px);  min-width: 120px; }
.sp-col-6  { flex-basis: calc(6/12 * 100% - 14px);  min-width: 160px; }
.sp-col-8  { flex-basis: calc(8/12 * 100% - 14px);  min-width: 200px; }
.sp-col-9  { flex-basis: calc(9/12 * 100% - 14px);  min-width: 200px; }
.sp-col-12 { flex-basis: 100%; }

@media (max-width: 600px) {
    .sp-col-2, .sp-col-3, .sp-col-4,
    .sp-col-6, .sp-col-8, .sp-col-9 {
        flex-basis: 100%;
    }
}

/* ── Inputs ──────────────────────────────────────────────────────────────── */
.sp-field label {
    font-size: 0.88em;
    font-weight: 600;
    color: #444;
}

.sp-field label .req {
    color: #c0392b;
}

#sp-form input[type="text"],
#sp-form input[type="email"],
#sp-form input[type="tel"],
#sp-form input[type="date"],
#sp-form input[type="number"],
#sp-form select,
#sp-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95em;
    font-family: inherit;
    color: #333;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

#sp-form input:focus,
#sp-form select:focus,
#sp-form textarea:focus {
    outline: none;
    border-color: #825339;
    box-shadow: 0 0 0 3px rgba(130, 83, 57, 0.18);
}

#sp-form input.sp-invalid,
#sp-form select.sp-invalid,
#sp-form textarea.sp-invalid {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

.sp-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: normal !important;
}

.sp-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Navigation buttons ──────────────────────────────────────────────────── */
.sp-nav {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.sp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border: none;
    border-radius: 4px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.sp-btn:active { transform: scale(0.98); }
.sp-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.sp-btn-primary {
    background: #825339;
    color: #fff;
    margin-left: auto;
}
.sp-btn-primary:hover { background: #76482e; }

.sp-btn-secondary {
    background: #e0e0e0;
    color: #333;
}
.sp-btn-secondary:hover { background: #c8c8c8; }

.sp-btn-success {
    background: #825339;
    color: #fff;
    margin-left: auto;
}
.sp-btn-success:hover { background: #76482e; }

/* ── Meldingen ───────────────────────────────────────────────────────────── */
.sp-melding {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.sp-error {
    background: #fdecea;
    border-left: 4px solid #c0392b;
    color: #7b241c;
}

.sp-error a { color: #7b241c; text-decoration: underline; }

#sp-form-error {
    margin-top: 16px;
    margin-bottom: 0;
}

/* ── Summary table ───────────────────────────────────────────────────────── */
.sp-samenvatting {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.sp-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.sp-summary-table td,
.sp-summary-table th {
    padding: 7px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top;
}

.sp-summary-section {
    background: #825339;
    color: #fff;
    font-size: 0.82em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 12px !important;
}

.sp-summary-key {
    width: 38%;
    font-weight: 600;
    color: #555;
}

/* ── Intropagina ─────────────────────────────────────────────────────────── */
.sp-intro-tekst {
    margin-bottom: 28px;
    line-height: 1.7;
    color: #444;
}

.sp-start-knop {
    margin-top: 8px;
}

.sp-btn-start {
    padding: 12px 32px;
    font-size: 1.05em;
}

/* ── Inschrijvingen lijst (stap 2) ───────────────────────────────────────── */
.sp-inschrijvingen-lijst {
    margin-bottom: 16px;
}

.sp-geen-items {
    color: #888;
    font-style: italic;
    padding: 12px 0;
    margin: 0;
}

.sp-inschrijving-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #e0d4c8;
    border-radius: 6px;
    background: #faf7f4;
    margin-bottom: 8px;
}

.sp-inschrijving-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.sp-inschrijving-naam {
    font-weight: 600;
    color: #222;
}

.sp-inschrijving-ras {
    font-size: 0.85em;
    color: #666;
}

.sp-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}

.sp-badge-kat  { background: #ecddd3; color: #5a3520; }
.sp-badge-nest { background: #e8ddd0; color: #3d2510; }

.sp-inschrijving-acties {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.sp-btn-klein {
    padding: 4px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.82em;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    color: #333;
    transition: background 0.12s;
}

.sp-btn-klein:hover { background: #f0f0f0; }

.sp-btn-danger {
    border-color: #e8b4b2;
    color: #c0392b;
    background: #fff5f5;
}
.sp-btn-danger:hover { background: #fdecea; }

/* ── Toevoeg-knoppen ─────────────────────────────────────────────────────── */
.sp-toevoeg-knoppen {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* ── Inline add/edit form ────────────────────────────────────────────────── */
.sp-add-form {
    background: #faf7f4;
    border: 1px solid #d4b8a0;
    border-radius: 6px;
    padding: 20px;
    margin-top: 8px;
}

.sp-add-form-titel {
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #825339;
    color: #825339;
    font-size: 1.05em;
}

.sp-add-form-acties {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e0d4c8;
    justify-content: flex-end;
}

/* ── Taal kiezer ─────────────────────────────────────────────────────────── */
.sp-taal-kiezer {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}

.sp-taal-btn {
    background: none;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 2px 4px;
    font-size: 1.5em;
    line-height: 1;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 0.15s, border-color 0.15s;
}

.sp-taal-btn:hover   { opacity: 0.8; }
.sp-taal-btn.active  { opacity: 1; border-color: #825339; }

/* ── Bedankt ─────────────────────────────────────────────────────────────── */
.sp-bedankt {
    background: #f0e6dc;
    border: 1px solid #d4b8a0;
    border-radius: 6px;
    padding: 32px 28px;
    text-align: center;
    color: #5a3520;
}

.sp-bedankt h3 { color: #5a3520; margin-top: 0; }
