/* SlotBooking Public Styles v0.6.8 */

/* Container: erbt Positionierung vom Editor */
.sb-app {
    max-width: 640px;
    font-family: inherit;
}

/* Buchungsformular + Kundenportal: linksbündig */
#sb-booking-app,
#sb-customer-app {
    margin: 0;
}

/* Verfügbarkeits-Widget: Position vom Editor */
#sb-availability-app {
    max-width: 400px;
}

.sb-app * { box-sizing: border-box; }

.sb-loading {
    text-align: center;
    padding: 48px 20px;
    color: #7c7c78;
    font-size: 14px;
}

.sb-spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid #e4e2dc;
    border-top-color: var(--sb-pc, #21539e);
    border-radius: 50%;
    animation: sb-spin 0.7s linear infinite;
    margin-bottom: 12px;
}

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

/* Kalender Grid */
.sb-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}

.sb-day-header {
    font-size: 12px;
    font-weight: 700;
    color: #7c7c78;
    padding: 8px 0;
}

.sb-day {
    padding: 10px 4px;
    border-radius: 10px;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.12s ease;
    border: 2px solid transparent;
}

.sb-day.inactive { opacity: 0.15; cursor: default; }
.sb-day.past { opacity: 0.4; cursor: default; }
.sb-day.closed { opacity: 0.4; cursor: default; }
.sb-day.selected { color: #fff; }

.sb-day-num { font-size: 16px; font-weight: 700; }
.sb-day-avail { font-size: 9px; font-weight: 700; margin-top: 2px; }
.sb-day-label { font-size: 8px; font-weight: 700; }

/* Slot Grid */
.sb-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.sb-slot {
    padding: 14px 8px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.12s ease;
    font-family: inherit;
    border: 1px solid #e4e2dc;
}

.sb-slot:disabled { opacity: 0.35; cursor: not-allowed; }
.sb-slot.selected { border-width: 2px; }
.sb-slot-time { font-weight: 800; font-size: 15px; }
.sb-slot-avail { font-size: 11px; font-weight: 700; margin-top: 3px; }

/* Formular */
.sb-form {
    margin-top: 18px;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e4e2dc;
}

.sb-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.sb-form label {
    font-size: 11px;
    font-weight: 700;
    color: #7c7c78;
    display: block;
    margin-bottom: 4px;
}

.sb-form input, .sb-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #e4e2dc;
    font-size: 15px;
    font-family: inherit;
    outline: none;
}

.sb-btn {
    padding: 15px 24px;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
    margin-top: 18px;
}

.sb-btn:disabled { opacity: 0.5; }

.sb-confirmation {
    border-radius: 12px;
    padding: 32px;
    text-align: center;
}

/* Customer Portal */
.sb-portal-entry {
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #e4e2dc;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.sb-portal-date {
    text-align: center;
    min-width: 56px;
}

.sb-portal-date-num { font-size: 22px; font-weight: 800; line-height: 1; }
.sb-portal-date-month { font-size: 11px; color: #7c7c78; }

/* ═══ MOBILE ═══ */
@media (max-width: 600px) {
    .sb-app {
        max-width: 100%;
        padding: 0 4px;
    }
    .sb-calendar-grid {
        gap: 3px;
    }
    .sb-day {
        padding: 6px 2px;
        min-height: 48px;
        border-radius: 8px;
    }
    .sb-day-num { font-size: 14px; }
    .sb-day-avail { font-size: 8px; }
    .sb-day-header { font-size: 11px; padding: 6px 0; }
    .sb-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 6px;
    }
    .sb-slot {
        padding: 10px 4px;
    }
    .sb-slot-time { font-size: 13px; }
    .sb-slot-avail { font-size: 10px; }
    .sb-form {
        padding: 16px;
    }
    .sb-form-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .sb-form input, .sb-form textarea {
        font-size: 16px; /* prevents iOS zoom */
        padding: 12px;
    }
    .sb-portal-entry {
        padding: 12px;
        gap: 10px;
    }
    .sb-confirmation {
        padding: 24px 16px;
    }
}

@media (max-width: 380px) {
    .sb-day {
        min-height: 42px;
        padding: 4px 1px;
    }
    .sb-day-num { font-size: 13px; }
    .sb-slots-grid {
        grid-template-columns: 1fr 1fr;
    }
}
