.reserra-slot {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
}

.reserra-toggle {
    background: #d40000;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
}

.reserra-form-wrapper {
    margin-top: 15px;
}

.reserra-form-wrapper {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}

.reserra-toggle.disabled {
    background: #999;
    cursor: not-allowed;
}
.reserra-form button {
    position: relative;
    padding: 10px 20px;
}

.reserra-form button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.reserra-form button.loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-top: 2px solid transparent;
    border-radius: 50%;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translateY(-50%) rotate(360deg); }
}
.reserra-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.reserra-modal.show {
    display: flex;
}

.reserra-modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    min-width: 300px;
}

.reserra-modal-content button {
    margin-top: 15px;
    background: #d40000;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
}

.reserra-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    gap: 12px;
    margin-top: 15px;
    align-items: center;
}

/* FIELD WRAPPER */
.reserra-field {
    position: relative;
    display: flex;
    align-items: center;
}

.reserra-field input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.reserra-field input:focus {
    border-color: #d40000;
    box-shadow: 0 0 0 2px rgba(212,0,0,0.15);
    outline: none;
}

/* ICON */
.reserra-icon {
    position: absolute;
    left: 12px;
    font-size: 14px;
    opacity: 0.6;
}

/* SMALL FIELD (ilosc osob) */
.reserra-field.small input {
    padding-left: 40px;
    text-align: center;
}

/* SUBMIT BUTTON */
.reserra-submit {
    background: #d40000;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.reserra-submit:hover {
    background: #b80000;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .reserra-form {
        grid-template-columns: 1fr;
    }

    .reserra-submit {
        width: 100%;
    }
}
.reserra-toggle.full {
    background: #999;
}

.reserra-toggle.closed {
    background: #333;
}
.reserra-hidden {
    display: none;
}

.reserra-availability {
    margin-top: 8px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 6px;
    display: inline-block;
    font-size: 14px;
    letter-spacing: 0.3px;
}

/* Zielony – dużo miejsc */
.availability-ok {
    background-color: #e6f7ec;
    color: #1f7a3e;
    border: 1px solid #b7e4c7;
}

/* Pomarańczowy – mało miejsc */
.availability-warning {
    background-color: #fff4e5;
    color: #b05c00;
    border: 1px solid #ffd8a8;
}

/* Czerwony – ostatnie miejsca */
.availability-critical {
    background-color: #fdeaea;
    color: #a30000;
    border: 1px solid #f5b5b5;
}

/* Date selection is scoped so theme and other calendars do not affect each other. */
.reserra-booking [hidden] { display: none !important; }
.reserra-booking { --reserra-accent: #b91c1c; width: 100%; min-width: 0; }
.reserra-booking .reserra-step { margin: 0 0 16px; font-size: 22px; font-weight: 750; line-height: 1.3; }
.reserra-booking .reserra-date-controls { max-width: 480px; margin: 0 auto 28px; padding: 20px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; color: #1f2937; }
.reserra-month-nav { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 8px; align-items: center; }
.reserra-booking .reserra-month { width: 100%; min-width: 0; height: 48px; margin: 0; padding: 6px 8px; font: inherit; font-size: 17px; font-weight: 700; border: 1px solid #d1d5db; border-radius: 8px; background: white; color: #1f2937; }
.reserra-booking .reserra-month-nav button { width: 48px; height: 48px; margin: 0; padding: 0; border: 1px solid #d1d5db; border-radius: 8px; background: white; color: #1f2937; font-size: 25px; }
.reserra-booking .reserra-month-nav button:disabled { opacity: .35; cursor: default; }
.reserra-weekdays, .reserra-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.reserra-weekdays { margin: 18px 0 8px; text-align: center; font-size: 12px; font-weight: 650; color: #5f6670; }
.reserra-booking .reserra-day { min-width: 0; min-height: 44px; width: 100%; margin: 0; padding: 6px 0; border: 1px solid #9fc4ab; border-radius: 8px; background: #edf7f0; color: #205d36; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.reserra-booking .reserra-day:disabled { background: #f5f5f5; color: #a2a2a2; border-color: transparent; cursor: default; }
.reserra-booking .reserra-day-unavailable:disabled { text-decoration: line-through; color: #777; }
.reserra-booking .reserra-day[aria-pressed="true"] { background: var(--reserra-accent); color: white; border-color: var(--reserra-accent); }
.reserra-booking button:focus-visible, .reserra-booking select:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.reserra-booking .reserra-calendar-help { margin: 14px 0 10px; font-size: 13px; line-height: 1.5; color: #56615b; }
.reserra-booking .reserra-nearest { display: block; width: 100%; min-height: 44px; margin: 0; padding: 8px; background: white; color: var(--reserra-accent); border: 1px solid #e5bcbc; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; }
.reserra-booking .reserra-day-heading { margin: 0 0 20px; font-size: 18px; line-height: 1.5; font-weight: 700; }
.reserra-booking .reserra-slot { padding: 18px; border-radius: 12px; background: white; }
.reserra-slot-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; align-items: center; }
.reserra-booking .reserra-time { margin: 0; font-size: 25px; font-weight: 750; }
.reserra-booking .reserra-slot-name { margin: 8px 0 14px; font-size: 16px; }
.reserra-booking .reserra-toggle { width: 100%; min-height: 48px; border-radius: 8px; font-size: 16px; font-weight: 700; }
.reserra-booking .reserra-form-summary { grid-column: 1 / -1; margin: 0; font-size: 15px; font-weight: 700; }
.reserra-booking .reserra-field { min-width: 0; }
.reserra-booking .reserra-field input { min-height: 48px; font-size: 16px; }
.reserra-booking .reserra-submit { min-height: 48px; }
.reserra-booking .reserra-date-empty { margin: 12px 0 24px; }
@media (max-width: 380px) {
    .reserra-booking .reserra-date-controls { padding: 12px 8px; }
    .reserra-weekdays, .reserra-days { gap: 2px; }
}

.reserra-booking .reserra-step-hours { scroll-margin-top: 24px; outline: none; }
.reserra-booking .reserra-change-day { min-height: 44px; margin: 0 0 8px; padding: 4px 0; border: 0; background: transparent; color: var(--reserra-accent); font: inherit; font-size: 15px; text-decoration: underline; cursor: pointer; }
