/* Showprogramma Inschrijven — WordPress plugin stylesheet */

#sp-inschrijven-app {
    max-width: 860px;
    margin: 0 auto;
    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: #005c9d;
    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: #f0f6fc;
    border-left: 4px solid #005c9d;
    padding: 16px 20px;
    margin-bottom: 24px;
    border-radius: 0 4px 4px 0;
}

.sp-show-info h2 {
    margin: 0 0 4px;
    color: #005c9d;
    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: #005c9d;
    color: #fff;
}

.sp-step-item.completed {
    background: #d4edda;
    color: #155724;
}

.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: #28a745; color: #fff; }

/* ── Form sections ───────────────────────────────────────────────────────── */
.sp-step h3 {
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #005c9d;
    color: #005c9d;
    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: #005c9d;
    box-shadow: 0 0 0 3px rgba(0, 92, 157, 0.15);
}

#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: #005c9d;
    color: #fff;
    margin-left: auto;
}
.sp-btn-primary:hover { background: #004a80; }

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

.sp-btn-success {
    background: #28a745;
    color: #fff;
    margin-left: auto;
}
.sp-btn-success:hover { background: #218838; }

/* ── 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: #005c9d;
    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-keuze-knoppen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 8px;
}

.sp-keuze-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 36px 24px;
    background: #f0f6fc;
    border: 2px solid #005c9d;
    border-radius: 10px;
    text-decoration: none;
    color: #005c9d;
    transition: background 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
}

.sp-keuze-btn:hover {
    background: #005c9d;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 18px rgba(0, 92, 157, 0.22);
}

.sp-keuze-icoon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.sp-keuze-titel {
    font-size: 1.15em;
    font-weight: 700;
    line-height: 1.2;
}

.sp-keuze-sub {
    font-size: 0.88em;
    opacity: 0.72;
    line-height: 1.4;
}

@media (max-width: 500px) {
    .sp-keuze-knoppen {
        grid-template-columns: 1fr;
    }
}

/* ── 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 #dde4ea;
    border-radius: 6px;
    background: #f7fafd;
    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: #dbeafe; color: #1e40af; }
.sp-badge-nest { background: #dcfce7; color: #166534; }

.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: #f5f9ff;
    border: 1px solid #bcd4ee;
    border-radius: 6px;
    padding: 20px;
    margin-top: 8px;
}

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

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

/* ── Bedankt ─────────────────────────────────────────────────────────────── */
.sp-bedankt {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 32px 28px;
    text-align: center;
    color: #155724;
}

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