/* ==========================================================================
   STARTLIJSTEN PRO — FRONTEND CSS
   ========================================================================== */

/* --------------------------------------------------------------------------
   FORMULIER WRAPPER
   -------------------------------------------------------------------------- */

#inschrijf-formulier {
  max-width: 700px;
  margin: 24px auto;
  padding: 28px 24px;
  background: #fff;
  border: 1px solid #dce1e7;
  border-radius: 8px;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   GRID LAYOUT
   -------------------------------------------------------------------------- */

.startlijsten-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.startlijsten-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.startlijsten-col-50 { flex: 1 1 calc(50% - 8px); min-width: 140px; }
.startlijsten-col-60 { flex: 1 1 calc(60% - 8px); min-width: 140px; }
.startlijsten-col-40 { flex: 1 1 calc(40% - 8px); min-width: 120px; }
.startlijsten-col-70 { flex: 1 1 calc(70% - 8px); min-width: 140px; }
.startlijsten-col-30 { flex: 1 1 calc(30% - 8px); min-width: 100px; }

@media (max-width: 600px) {
  .startlijsten-col-50,
  .startlijsten-col-60,
  .startlijsten-col-40,
  .startlijsten-col-70,
  .startlijsten-col-30 {
    flex: 1 1 100%;
  }
}

/* --------------------------------------------------------------------------
   FIELD GROUPS (SINGLE-COLUMN FIELDS)
   -------------------------------------------------------------------------- */

.startlijsten-field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   LABELS & REQUIRED MARKER
   -------------------------------------------------------------------------- */

.startlijsten-label {
  display: block;
  font-weight: 500;
  font-size: 14px;
  color: #1d2327;
  line-height: 1.4;
}

/* inputs/selects wrapped inside a label (JS-generated rubriek cards) */
.startlijsten-label input,
.startlijsten-label select {
  display: block;
  margin-top: 5px;
}

.startlijsten-form .required {
  display: inline !important;
  margin-left: 2px;
  color: red;
}

/* --------------------------------------------------------------------------
   INPUTS & SELECTS
   -------------------------------------------------------------------------- */

#inschrijf-formulier input[type="text"],
#inschrijf-formulier input[type="email"],
#inschrijf-formulier input[type="tel"],
#inschrijf-formulier input[type="number"],
#inschrijf-formulier select {
  padding: 9px 11px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  color: #1d2327;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
  width: 100%;
}

#inschrijf-formulier input:focus,
#inschrijf-formulier select:focus {
  border-color: #0073aa;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.15);
}

#inschrijf-formulier input.startlijsten-input-error {
  border-color: #d63638;
  box-shadow: 0 0 0 2px rgba(214, 54, 56, 0.12);
}

/* --------------------------------------------------------------------------
   RUBRIEK CARD
   -------------------------------------------------------------------------- */

.rubriek-blok {
  background: #f9fafb;
  border: 1px solid #dce1e7;
  border-radius: 6px;
  padding: 14px 16px 12px;
  margin-bottom: 16px;
}

.rubriek-blok-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e8ec;
}

.rubriek-blok-titel {
  font-weight: 600;
  font-size: 14px;
  color: #1d2327;
}

.js-remove-rubriek {
  background: none;
  border: none;
  padding: 0;
  color: #d63638;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  line-height: 1;
}

.js-remove-rubriek:hover {
  color: #9e0001;
  text-decoration-style: solid;
}

/* Grid layout inside rubriek card — one shared rule covers both rows */
.rubriek-blok .startlijsten-row {
  display: grid;
  grid-template-columns: 1fr 200px;
  align-items: end;
  gap: 16px;
  margin-bottom: 10px;
}

.rubriek-blok .startlijsten-row.paard-rij {
  margin-bottom: 8px;
}

.rubriek-blok .startlijsten-row.paard-rij:last-child {
  margin-bottom: 0;
}

/* Reset min-width from .startlijsten-col-* so the 200px column is respected */
.rubriek-blok .startlijsten-col {
  min-width: 0;
}

/* Prevent individual col-* widths from overriding the grid */
.rubriek-blok .startlijsten-row > * {
  width: 100% !important;
}

/* Consistent input/select height inside cards */
.rubriek-blok input[type="text"],
.rubriek-blok select {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
  width: 100%;
}

@media (max-width: 600px) {
  .rubriek-blok .startlijsten-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

/* --------------------------------------------------------------------------
   FORM FOOTER
   -------------------------------------------------------------------------- */

.startlijsten-form-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #e5e8ec;
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */

.startlijsten-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0f0f1;
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  color: #1d2327;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 16px;
  transition: background 0.15s ease, border-color 0.15s ease;
  align-self: flex-start;
}

.startlijsten-btn-secondary:hover {
  background: #e5e5e5;
  border-color: #aaa;
}

.startlijsten-btn-primary {
  display: block;
  background: #1a6fa8;
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  padding: 16px 24px;
  text-align: center;
  transition: background 0.15s ease, transform 0.15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.startlijsten-btn-primary:hover,
.startlijsten-btn-primary:focus {
  background: #155d8e;
  outline: none;
  transform: translateY(-1px);
}

.startlijsten-btn-primary:active {
  background: #004f75;
}

.startlijsten-btn-primary:disabled {
  background: #a0c4d8;
  cursor: not-allowed;
}

.startlijsten-btn-full {
  width: 100%;
}

/* --------------------------------------------------------------------------
   VOORWAARDEN CHECKBOX
   -------------------------------------------------------------------------- */

.voorwaarden-blok {
  margin: 0;
}

.voorwaarden-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-weight: 400;
  font-size: 14px;
}

.voorwaarden-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  margin-top: 1px;
}

.voorwaarden-label span {
  line-height: 1.5;
}

.voorwaarden-label a {
  color: #0073aa;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   ONTHOUD GEGEVENS
   -------------------------------------------------------------------------- */

.startlijsten-onthoud-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  margin-top: 20px;
  margin-bottom: 16px;
}

.startlijsten-onthoud-label input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   DEADLINE NOTICE
   -------------------------------------------------------------------------- */

.startlijsten-deadline-notice {
  margin-top: 6px;
  font-size: 13px;
  color: #666;
  min-height: 0;
}

/* --------------------------------------------------------------------------
   MELDINGEN
   -------------------------------------------------------------------------- */

.startlijsten-melding-succes {
  max-width: 700px;
  margin: 24px auto;
  padding: 16px 20px;
  background: #edfaef;
  border: 1px solid #7ad09a;
  border-radius: 6px;
  color: #0a5426;
}

.startlijsten-melding-succes strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
}

.startlijsten-melding-succes p {
  margin: 0;
  font-size: 14px;
}

.startlijsten-melding-fout {
  padding: 12px 16px;
  background: #fef0f0;
  border: 1px solid #f5a6a6;
  border-radius: 6px;
  color: #7a0000;
  font-size: 14px;
  margin-bottom: 16px;
}

.startlijsten-melding-waarschuwing {
  padding: 12px 16px;
  background: #fff8e5;
  border: 1px solid #e9c46a;
  border-radius: 6px;
  color: #5a3e00;
  font-size: 14px;
}

#startplekken-melding {
  margin-bottom: 0;
}

#startplekken-melding:not(:empty) {
  margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   STARTLIJST / DEELNEMERSLIJST
   -------------------------------------------------------------------------- */

.startlijsten-lijst-wrapper {
  max-width: 700px;
  margin: 20px auto 0;
  font-family: inherit;
}

.startlijsten-lijst-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8edf2;
}

.startlijsten-lijst-titel {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: #1a1a1a;
  font-family: inherit;
}

.startlijsten-lijst-separator {
  color: #999;
  font-weight: 400;
  margin: 0 4px;
}

.startlijsten-lijst-type {
  color: #2271b1;
  font-weight: 600;
}

.startlijst-rubriek {
  background: #fff;
  border: 1px solid #dce1e7;
  border-radius: 6px;
  padding: 0 16px;
  margin-bottom: 10px;
  font-family: inherit;
}

.startlijst-rubriek summary {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  font-family: inherit;
}

.startlijst-rubriek summary::-webkit-details-marker { display: none; }
.startlijst-rubriek summary::after { content: "▸"; color: #999; font-size: 12px; margin-left: 8px; }
.startlijst-rubriek[open] summary::after { content: "▾"; }
.startlijst-rubriek[open] summary { border-bottom: 1px solid #e8edf2; margin-bottom: 4px; }

.startlijsten-badge {
  background: #f0f4f8;
  color: #666;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: auto;
  margin-right: 8px;
  font-family: inherit;
}

.startlijst {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 8px;
  font-family: inherit;
  font-size: 14px;
}

.startlijst th {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  padding: 6px 12px;
  border-bottom: 1px solid #e8edf2;
  text-align: left;
  text-transform: none;
  font-family: inherit;
}

.startlijst td {
  color: #333;
  padding: 8px 12px;
  border-bottom: 1px solid #f5f5f5;
  font-family: inherit;
  text-align: left;
}

.startlijst tr:last-child td { border-bottom: none; }
.startlijst tr:hover td { background: #fafbfc; }
.startlijst td:first-child { width: 36px; color: #aaa; font-size: 13px; }
