/* === Buchungs-Statusmeldung === */
.fsbk-booking-notice {
    max-width: 500px;
    margin: 16px auto 0;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}
.fsbk-booking-notice-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.fsbk-booking-notice-error { background: #fdecea; color: #c62828; border: 1px solid #f5c6cb; }

/* === Formular Layout === */
form.terminbuchung-form {
    max-width: 500px;
    margin: 24px auto;
    padding: 18px 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    font-family: Arial, sans-serif;
}

/* Layout width presets applied via wrapper class .layout-width-* */
.layout-width-compact form.terminbuchung-form { max-width: 380px; }
.layout-width-medium form.terminbuchung-form { max-width: 500px; }
.layout-width-wide form.terminbuchung-form { max-width: 800px; }
.layout-width-full form.terminbuchung-form { max-width: 100%; }

/* Optional generic container presets (also used by other components) */
.fsbk-layout.layout-width-compact { max-width: 720px; margin-left:auto; margin-right:auto; }
.fsbk-layout.layout-width-medium { max-width: 960px; margin-left:auto; margin-right:auto; }
.fsbk-layout.layout-width-wide { max-width: 1200px; margin-left:auto; margin-right:auto; }
.fsbk-layout.layout-width-full { width: 100%; max-width: 100%; margin: 0; }

/* Labels */
form.terminbuchung-form label {
    display: block;
    margin: 12px 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

form.terminbuchung-form .infoText {
    display: block;
    margin: 12px 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Inputs */
form.terminbuchung-form input[type="text"],
form.terminbuchung-form input[type="email"] {
    width: 100%;
    /* 16px bleibt: darunter zoomt Safari auf dem iPhone beim Antippen
       ins Feld hinein. Verkleinert wird nur die Polsterung. */
    padding: 8px 10px;
    font-size: 16px;
    border: 1px solid #bbb;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

form.terminbuchung-form input[type="text"]:focus,
form.terminbuchung-form input[type="email"]:focus {
    border-color: #0073aa;
    outline: none;
}

/* === Location & Timeslot Grids === */
form.terminbuchung-form .location-group,
form.terminbuchung-form .timeslot-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 9px;
    margin-top: 8px;
}

/* Buttons */
form.terminbuchung-form .location-button,
form.terminbuchung-form .timeslot-button {
    padding: 8px 6px;
    font-size: 14px;
    border: 1px solid #0073aa;
    background-color: #fff;
    color: #0073aa;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    user-select: none;
}

form.terminbuchung-form .location-button:hover,
form.terminbuchung-form .location-button.selected,
form.terminbuchung-form .timeslot-button:hover,
form.terminbuchung-form .timeslot-button.selected {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

form.terminbuchung-form .timeslot-button.disabled {
    background-color: #eee !important;
    color: #999 !important;
    cursor: not-allowed;
    border: 1px solid #ccc;
}

/* === Submit Button === */
form.terminbuchung-form input[type="submit"] {
    margin-top: 20px;
    background-color: #0073aa;
    color: #fff;
    cursor: pointer;
    border: none;
    padding: 10px 16px;
    font-size: 15px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
    width: 100%;
    box-sizing: border-box;
}

form.terminbuchung-form input[type="submit"]:hover {
    background-color: #fff;
    color: #0073aa;
    border: 1px solid #0073aa;
}

/* === Datum Anzeige === */
form.terminbuchung-form #date-display {
    margin: 12px 16px 16px;
    font-size: 1.35em;
    font-weight: bold;
    color: #333;
    text-align: center;
}

/* === Erfolgs- & Fehlermeldungen === */
.success-message,
.error-message {
    max-width: 500px;
    margin: 20px auto;
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.success-message {
    border: 1px solid #4CAF50;
    background-color: #e8f5e9;
    color: #2e7d32;
}

.error-message {
    border: 1px solid #f44336;
    background-color: #fdecea;
    color: #c62828;
}

/* Manage-my-bookings container width presets */
.layout-width-compact .manage-bookings-container { max-width: 720px; }
.layout-width-medium .manage-bookings-container { max-width: 900px; }
.layout-width-wide .manage-bookings-container { max-width: 1200px; }
.layout-width-full .manage-bookings-container { max-width: 100%; width: 100%; }


/* ===================================================================== PH-7
   "Deine Anmeldung" — die Selbstverwaltung in der oeffentlichen
   Buchungsstrecke. Farben kommen aus app/tokens.css, damit sie nicht ein
   zweites Mal irgendwo stehen. Diese Flaeche zeigt nie Daten anderer
   Personen. */

.fsb-self {
  margin: 0 0 22px;
  padding: 15px 16px;
  background: var(--fsb-blau-10);
  border: 1.5px solid var(--fsb-blau);
  border-radius: 8px;
  font-family: var(--fsb-font);
  color: var(--fsb-text);
}
.fsb-self-title { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.fsb-self-intro { margin: 0 0 12px; font-size: 13.5px; color: var(--fsb-text-2); }

.fsb-self-item {
  background: var(--fsb-weiss);
  border: 1px solid var(--fsb-rand);
  border-radius: 6px;
  padding: 11px 12px;
  margin-bottom: 8px;
}
.fsb-self-item:last-of-type { margin-bottom: 0; }
.fsb-self-when { margin: 0 0 9px; font-size: 14.5px; }
.fsb-self-slot { font-variant-numeric: tabular-nums; }

.fsb-self-actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.fsb-self-actions form { display: flex; align-items: center; gap: 7px; margin: 0; }
.fsb-self-actions label { font-size: 13px; color: var(--fsb-text-2); }
.fsb-self-actions select {
  height: 34px; padding: 0 7px; font: inherit; font-size: 13.5px;
  border: 1.5px solid var(--fsb-schwarz); border-radius: 6px;
  background: var(--fsb-weiss); color: var(--fsb-text);
}

.fsb-self-btn {
  height: 34px; padding: 0 14px; border: 0; border-radius: 6px; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 700;
  background: var(--fsb-blau); color: var(--fsb-weiss);
}
.fsb-self-btn[disabled] { opacity: .5; cursor: default; }
/* Absagen ist die folgenreichere Handlung und traegt deshalb den Rahmen,
   nicht die Flaeche - sie soll nicht wie die Primaeraktion aussehen. */
.fsb-self-btn-danger {
  background: var(--fsb-weiss); color: var(--fsb-rot);
  border: 1.5px solid var(--fsb-rot);
}

.fsb-self-hint { margin: 0; font-size: 13px; color: var(--fsb-text-2); }
.fsb-self-status { margin: 8px 0 0; font-size: 13px; min-height: 1em; }
.fsb-self-status.is-ok { color: var(--fsb-schwarz); }
.fsb-self-status.is-error { color: var(--fsb-rot); font-weight: 700; }

@media (max-width: 560px) {
  .fsb-self-actions { flex-direction: column; align-items: stretch; }
  .fsb-self-actions form { flex-wrap: wrap; }
  .fsb-self-btn { width: 100%; min-height: 44px; }
  .fsb-self-actions select { min-height: 44px; }
}
