/* ******************************** */
/* ******** Terminbuchung ********* */
/* ******************************** */

.terminbuchung-wrapper {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 40px;
}

.termin-widget-full {
    width: 100%;
    background: linear-gradient(180deg, #ffffff 0%, #fff8f2 100%);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,102,0,0.10);
    box-sizing: border-box;
}

.termin-widget-head {
    margin-bottom: 20px;
}

.termin-widget-intro {
    margin: 0;
    color: #444;
    text-align: left;
}

.termin-layout-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
    gap: 24px;
    align-items: start;
}

.calendar-panel,
.booking-form-panel {
    width: 100%;
    box-sizing: border-box;
}

/* Kalenderbox */
.calendar-box {
    background-color: #ffffff;
    border-radius: 18px;
    border: 1px solid #ececec;
    padding: 16px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
}

.calendar-header {
    display: grid;
    grid-template-columns: 46px 1fr 46px;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.calendar-title {
    text-align: center;
    font-weight: 700;
    color: #1e1e1e;
    text-transform: capitalize;
    font-size: calc(14px + 0.4vw);
}

.calendar-nav {
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 14px;
    background: #1e1e1e;
    color: #ffffff;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.16);
    padding: 0;
}

.calendar-nav:hover:not(:disabled) {
    background-color: #ff6600;
    transform: translateY(-1px);
}

.calendar-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.calendar-weekdays div {
    text-align: center;
    font-weight: 700;
    color: #888;
    font-size: 0.9em;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    min-height: 46px;
    border: none;
    border-radius: 14px;
    background: #f3f3f3;
    color: #1e1e1e;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.22s ease;
    font-family: 'Rajdhani', sans-serif;
    font-size: calc(12px + 0.35vw);
    padding: 0;
}

.calendar-day:hover:not(:disabled) {
    transform: translateY(-2px);
    background-color: #ffe1cc;
}

.calendar-day.is-available {
    background: #fff2e8;
    color: #1e1e1e;
    border: 1px solid rgba(255,102,0,0.18);
}

.calendar-day.is-selected {
    background: linear-gradient(135deg, #ff7b00, #ff4500);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(255,102,0,0.28);
}

.calendar-day.is-disabled {
    background: #f3f3f3;
    color: #bbb;
    cursor: not-allowed;
}

.calendar-day.empty {
    background: transparent;
    pointer-events: none;
}

/* Slots */
.slots-box {
    margin-top: 18px;
    background-color: #ffffff;
    border-radius: 18px;
    border: 1px solid #ececec;
    padding: 18px;
}

.slots-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.slots-date-label {
    font-weight: 700;
    color: #1e1e1e;
}

.clear-slot-btn {
    border: 1px solid rgba(255,102,0,0.25);
    background: #ffffff;
    color: #ff6600;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    transition: all 0.2s ease;
}

.clear-slot-btn:hover {
    background: #ff6600;
    color: #ffffff;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.slot-button {
    border: none;
    border-radius: 14px;
    padding: 12px 14px;
    background: #1e1e1e;
    color: #ffffff;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    font-size: calc(12px + 0.35vw);
    font-weight: 700;
    transition: all 0.22s ease;
}

.slot-button:hover:not(:disabled) {
    background: #ff6600;
    transform: translateY(-2px);
}

.slot-button.is-selected {
    background: linear-gradient(135deg, #ff7b00, #ff4500);
    box-shadow: 0 4px 10px rgba(255,102,0,0.26);
}

.slot-button.is-booked,
.slot-button:disabled {
    background: #d9d9d9;
    color: #777;
    cursor: not-allowed;
    box-shadow: none;
}

.slot-hint {
    margin-top: 14px;
    color: #666;
    font-size: 0.95em;
}

/* Formular */
.terminformular {
    width: 100%;
    background-color: #ffffff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    box-sizing: border-box;
}

.terminformular label {
    display: block;
    margin-bottom: 8px;
}

.terminformular input[type="text"],
.terminformular input[type="email"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-sizing: border-box;
    background-color: #ffffff;
    transition: border 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.terminformular input[type="text"]:focus,
.terminformular input[type="email"]:focus {
    border-color: #4a90e2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.terminformular button[type="submit"] {
    font-size: calc(16px + 0.8vw);
    padding: 20px 40px;
    border: none;
    border-radius: 20px;
    background-color: #ff6600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    color: #1e1e1e;
}

.terminformular button[type="submit"]:hover {
    background-color: #1e1e1e;
    color: #ffffff;
}

.selected-appointment-box {
    margin-top: 8px;
    margin-bottom: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fff5ee;
    border: 1px solid rgba(255,102,0,0.15);
}

.selected-appointment-title {
    color: #ff6600;
    font-weight: 700;
    margin-bottom: 4px;
}

.selected-appointment-text {
    color: #1e1e1e;
    font-weight: 600;
}

.booking-note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,102,0,0.08);
    color: #1e1e1e;
    border: 1px solid rgba(255,102,0,0.12);
    font-weight: 600;
}

.honeypot-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* globale span-Regel neutralisieren */
.termin-widget-full .calendar-title,
.termin-widget-full .slots-date-label,
.termin-widget-full .slot-hint,
.termin-widget-full .selected-appointment-text,
.termin-widget-full .selected-appointment-title,
.termin-widget-full .booking-note {
    color: inherit;
}

/* Pflichtstern beibehalten */
.terminformular label span {
    color: red;
}

/* Responsive */
@media (max-width: 980px) {
    .termin-layout-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .slot-grid {
        grid-template-columns: 1fr;
    }

    .calendar-day {
        min-height: 42px;
    }

    .calendar-nav {
        width: 42px;
        height: 42px;
    }

    .termin-widget-full,
    .terminformular {
        padding: 18px;
    }
}

.form-field {
    width: 100%;
    margin-bottom: 0.4rem;
}

.field-error {
    display: none;
    margin-top: -8px;
    margin-bottom: 12px;
    font-size: 0.9em;
    color: #ff4d4f;
    font-weight: 700;
    line-height: 1.25;
}

.terminformular.was-validated input:invalid,
.terminformular.was-validated textarea:invalid,
.rabattformular.was-validated input:invalid,
.rabattformular.was-validated textarea:invalid {
    border-color: #ff4d4f;
    background: linear-gradient(180deg, #fff 0%, #fff5f5 100%);
    box-shadow:
    0 0 0 3px rgba(255, 77, 79, 0.16),
    inset 0 1px 3px rgba(0,0,0,0.08);
}

.terminformular.was-validated input:invalid + .field-error,
.terminformular.was-validated textarea:invalid + .field-error,
.rabattformular.was-validated input:invalid + .field-error,
.rabattformular.was-validated textarea:invalid + .field-error {
    display: block;
}
