#smart-calendar-wrapper {
    max-width: 900px;
    margin: 20px auto;
}

/* ✅ Obsługa gestów swipe (touch) - pozwala na przewijanie pionowe, ale wykrywa poziome swipe */
#smartcalendar-wrapper {
    touch-action: pan-y;
    -ms-touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

/* ✅ Animacja nagłówków dat - taka sama jak sloty (płynna) */
.fc-col-header-cell.date-change-highlight,
.fc-day-header-custom.date-change-highlight {
    animation: slotBounceIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ✅ Animacja tytułu miesiąca - bez translateY (żeby nie przesuwał się) */
#calendar-title.date-change-highlight {
    animation: titleFadeScale 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes titleFadeScale {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.6);
    }
    60% {
        opacity: 1;
        transform: translateX(-50%) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* ✅ Specjalna animacja SPOTLIGHT dla przycisku "Dzisiaj" */
.today-spotlight {
    animation: todaySpotlight 1s ease-out forwards;
    animation-iteration-count: 1;
    position: relative;
    z-index: 100;
}

@keyframes todaySpotlight {
    0% {
        background-color: transparent;
        box-shadow: none;
    }
    40% {
        background-color: rgba(255, 215, 0, 0.6);
        box-shadow: 0 0 25px 12px rgba(255, 193, 7, 0.5);
    }
    70% {
        background-color: rgba(255, 215, 0, 0.2);
        box-shadow: 0 0 10px 5px rgba(255, 193, 7, 0.2);
    }
    100% {
        background-color: transparent;
        box-shadow: none;
    }
}

/* Animacja dla tekstu w spotlight - tylko tekst się powiększa */
.today-spotlight .fc-dzien,
.today-spotlight .fc-data,
.today-spotlight .fc-miesiac {
    animation: todayTextGlow 1s ease-out forwards;
    animation-iteration-count: 1;
}

@keyframes todayTextGlow {
    0% {
        color: inherit;
        text-shadow: none;
        font-weight: inherit;
        transform: scale(1);
    }
    40% {
        color: #ff8c00;
        text-shadow: 0 0 10px rgba(255, 193, 7, 0.8), 0 0 20px rgba(255, 215, 0, 0.6);
        font-weight: 700;
        transform: scale(1.15);
    }
    70% {
        color: inherit;
        text-shadow: none;
        font-weight: inherit;
        transform: scale(1);
    }
    100% {
        color: inherit;
        text-shadow: none;
        font-weight: inherit;
        transform: scale(1);
    }
}

/* Animacja dla całej kolumny dzisiejszej daty (widok tygodniowy) */
.today-column-highlight {
    animation: columnPulse 1s ease-out forwards;
    animation-iteration-count: 1;
}

@keyframes columnPulse {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(255, 215, 0, 0.15);
    }
}

/* ✅ Animacja wskakiwania wolnych slotów (eventów) przy zmianie widoku - SZYBKA WERSJA */
.fc-event.slot-pop-in {
    animation: slotPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slotPopIn {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(-10px);
    }
    70% {
        opacity: 1;
        transform: scale(1.05) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Wariant z delikatnym bounce dla eventów availability (zielone) - SZYBKA WERSJA */
.fc-event.slot-bounce-in {
    animation: slotBounceIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slotBounceIn {
    0% {
        opacity: 0;
        transform: scale(0.6) translateY(-15px);
    }
    60% {
        opacity: 1;
        transform: scale(1.05) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 🖥️ DESKTOP - Zmniejszone przybliżenie o połowę (scale z 1.05 → 1.025) */
@media (min-width: 769px) {
    @keyframes slotPopIn {
        0% {
            opacity: 0;
            transform: scale(0.7) translateY(-8px);
        }
        70% {
            opacity: 1;
            transform: scale(1.025) translateY(0);
        }
        100% {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }

    @keyframes slotBounceIn {
        0% {
            opacity: 0;
            transform: scale(0.75) translateY(-12px);
        }
        60% {
            opacity: 1;
            transform: scale(1.025) translateY(0);
        }
        100% {
            opacity: 1;
            transform: scale(1) translateY(0);
        }
    }
    
    @keyframes slotSplashIn {
        0% {
            opacity: 0;
            transform: scale(0.5);
            filter: blur(1px);
        }
        70% {
            opacity: 1;
            transform: scale(1.025);
            filter: blur(0);
        }
        100% {
            opacity: 1;
            transform: scale(1);
            filter: blur(0);
        }
    }
}

/* Animacja "pluśnięcia" - szybkie pojawienie się z efektem fali - SZYBKA WERSJA */
.fc-event.slot-splash-in {
    animation: slotSplashIn 0.3s ease-out forwards;
}

@keyframes slotSplashIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
        filter: blur(2px);
    }
    70% {
        opacity: 1;
        transform: scale(1.05);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* ---------- Stylizacja podsumowania rezerwacji ---------- */
#calendar-summary {
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

#calendar-summary:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

#slots-list {
    margin-bottom: 10px;
}

#slots-list p {
    margin: 4px 0;
    padding: 0;
    line-height: 1.4;
}

/* Komunikat "Brak zaznaczonych slotów" */
#slots-list p:only-child {
    color: #999;
    text-align: center;
    padding: 20px;
    font-style: italic;
    background: white;
    border-radius: 6px;
    border: 2px dashed #e0e0e0;
}

#slots-list p strong {
    display: block;
    color: #2c3e50;
    font-size: 15px;
    margin-bottom: 6px;
    margin-top: 10px;
    border-bottom: 2px solid #f5b5b5;
    padding-bottom: 4px;
}

#slots-list p:not(:has(strong)) {
    color: #555;
    padding-left: 12px;
    border-left: 3px solid #5be25b;
    margin-left: 5px;
    background: white;
    padding: 6px 10px;
    border-radius: 4px;
    margin-bottom: 4px;
    position: relative;
    transition: all 0.2s ease;
    font-size: 14px;
}

#slots-list p:not(:has(strong)):hover {
    border-left-color: #2ecc71;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transform: translateX(2px);
}

#slots-list p:not(:has(strong))::before {
    content: "🕐";
    margin-right: 6px;
    font-size: 13px;
}

#slots-list span[style*="color: #666"] {
    color: #888 !important;
    font-size: 0.9em;
    font-style: italic;
}

#slots-list hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 10px 0;
}

#slots-list p:last-child strong {
    color: #fff;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    font-size: 16px;
    border-bottom: none;
    margin-top: 10px;
    margin-bottom: 0;
    padding: 10px 14px;
    border-top: none;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#slots-list p:last-child strong::before {
    content: "⏱️ ";
    margin-right: 6px;
}

#add-to-cart-summary {
    width: 100%;
    background: linear-gradient(135deg, #000 0%, #2c2c2c 100%);
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

#add-to-cart-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

#add-to-cart-summary:hover::before {
    left: 100%;
}

#add-to-cart-summary:hover {
    background: linear-gradient(135deg, #2c2c2c 0%, #444 100%);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

#add-to-cart-summary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ========== KALENDARZ - UNIFIED DESIGN ========== */

/* Kontener główny z przyciskami nawigacji */
.calendar-topbar {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-bottom: 15px;
    gap: 10px;
}

/* Switcher widoków */
.calendar-switch {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 8px;
    flex: 1;
}

.calendar-btn {
    background: #fff;
    color: #000;
    padding: 0 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    line-height: 1;
}

.calendar-btn:hover {
    border-color: #f5b5b5;
    background: #fff5f5;
}

.calendar-btn.active {
    background: #f5b5b5;
    color: #000;
    border-color: #f5b5b5;
    font-weight: 600;
}

/* Strzałki nawigacji - SVG inline, zawsze identyczne */
.calendar-nav {
    background: #000;
    color: #fff;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    min-width: 40px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.calendar-nav:hover {
    background: #333;
    transform: scale(1.05);
}

.calendar-nav svg {
    display: block;
    flex-shrink: 0;
}

/* Podpowiedź swipe - ukryta domyślnie na desktop */
.calendar-swipe-hint {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: opacity 0.5s ease-in-out;
}

@media (max-width: 500px) {
    .calendar-swipe-hint {
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 24px 32px;
        background: rgba(255, 255, 255, 0.98);
        border: 2px solid #f5b5b5;
        border-radius: 16px;
        font-size: 15px;
        font-weight: 600;
        color: #333;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        text-align: center;
        min-width: 280px;
    }
    
    .calendar-swipe-hint svg {
        flex-shrink: 0;
        animation: swipeArrowMove 1.5s ease-in-out infinite;
    }
    
    .calendar-swipe-hint span {
        line-height: 1.4;
    }
    
    @keyframes swipeArrowMove {
        0%, 100% { transform: translateX(0); opacity: 0.6; }
        50% { transform: translateX(-8px); opacity: 1; }
    }
    
    .calendar-swipe-hint svg:last-child {
        animation: swipeArrowMoveRight 1.5s ease-in-out infinite;
    }
    
    @keyframes swipeArrowMoveRight {
        0%, 100% { transform: translateX(0); opacity: 0.6; }
        50% { transform: translateX(8px); opacity: 1; }
    }
}

/* Header kalendarza */
.calendar-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    min-height: 40px;
}

.calendar-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 40px;
}

.calendar-header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Przycisk "Dzisiaj" - IDENTYCZNA wysokość jak filtr */
.calendar-today-btn {
    background: #000;
    color: #fff;
    padding: 0 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    height: 40px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.calendar-today-btn:hover {
    background: #333;
    transform: scale(1.02);
}

.day-slot-btn {
    margin: 3px;
    padding: 5px 10px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #e0ffe0; /* zielony dla dostępnych slotów */
}
.day-slot-btn.selected {
    background-color: #5be25b;
    font-weight: bold;
}

.green-dot-indicator {
  width: 100%;
  height: 8px;
  border-radius: 2px;
  background-color: #5be25b;
  margin: 2px auto 0 auto;
}

/* ---------- Równa wysokość slotów w kalendarzu ---------- */
.fc-timegrid-slot {
    height: calc(100% / 15) !important; /* 15 godzin od 9:00 do 24:00 */
    min-height: 0 !important;
}

.fc-timegrid-col .fc-timegrid-slot {
    height: calc(100% / 15) !important;
    min-height: 0 !important;
}

input.readonly-qty {
    width: 60px; /* zmniejszamy szerokość */
    background-color: #f5f5f5; /* opcjonalnie */
    cursor: not-allowed; /* wskazuje, że nie można edytować */
    text-align: center;
}
.calendar-today-btn {
    position: absolute;
    right: 0;      /* wyrównanie do prawej */
    background: #000;
    color: #fff;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.calendar-today-btn:hover {
    background: #333;
}
.calendar-header {
    position: relative; 
    display: flex;
    justify-content: space-between;   /* rozdzielenie elementów */
    align-items: center;
    margin-bottom: 15px;
}

.calendar-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.calendar-header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.operator-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

/* Animacja pulsowania całego przycisku */
.operator-filter.pulse .operator-filter-btn {
    animation: filterButtonPulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(245, 181, 181, 0.7);
}

@keyframes filterButtonPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 181, 181, 0.7);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(245, 181, 181, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 181, 181, 0);
    }
}

/* Przycisk otwierający modal z operatorami - IDENTYCZNA wysokość */
.operator-filter-btn {
    background: #000;
    color: #fff;
    padding: 0 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s;
    height: 40px;
    line-height: 1;
    position: relative;
}

.operator-filter-btn:hover {
    background: #333;
    transform: scale(1.02);
}

.operator-filter-btn .filter-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px solid #f5b5b5;
}

.operator-filter-btn .filter-icon svg {
    display: block;
    flex-shrink: 0;
}

/* Avatar w przycisku filtra */
.operator-filter-btn .operator-avatar-small {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px;
    min-height: 32px;
    border-radius: 50% !important;
    object-fit: cover;
    border: 2px solid #f5b5b5;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.operator-filter-btn:hover .operator-avatar-small {
    transform: scale(1.05);
}

/* Na wąskich ekranach - tylko ikona/avatar, bez tekstu */
@media (max-width: 500px) {
    .calendar-topbar {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: stretch;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .calendar-nav {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
    
    .calendar-nav.prev {
        order: 1;
    }
    
    .calendar-switch {
        order: 2;
        display: flex;
        flex-direction: column;
        gap: 0;
        flex: 1;
    }
    
    .calendar-nav.next {
        order: 3;
    }
    
    .calendar-btn {
        flex: 1;
        width: 100%;
        padding: 0 8px;
        font-size: 12px;
        height: 100%;
    }
    
    .operator-filter-btn {
        padding: 0;
        background: transparent;
        min-width: auto;
        justify-content: center;
        height: 40px;
    }
    
    .operator-filter-btn:hover {
        background: transparent;
        transform: scale(1.05);
    }
    
    .operator-filter-btn #operator-filter-label {
        display: none;
    }
    
    .operator-filter-btn .filter-icon {
        margin: 0;
        width: 40px;
        height: 40px;
    }
    
    .operator-filter-btn .operator-avatar-small {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px;
        min-height: 40px;
    }
    
    .calendar-today-btn {
        padding: 0 12px;
        font-size: 13px;
        height: 40px;
    }
}

/* Średnie ekrany - skróć tekst */
@media (min-width: 501px) and (max-width: 768px) {
    .operator-filter-btn {
        padding: 0 12px;
        font-size: 13px;
        max-width: 140px;
        height: 40px;
    }
    
    .operator-filter-btn .filter-icon {
        width: 28px;
        height: 28px;
    }
    
    .operator-filter-btn .operator-avatar-small {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px;
        min-height: 28px;
    }
    
    .operator-filter-btn #operator-filter-label {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .calendar-today-btn {
        padding: 0 12px;
        font-size: 13px;
        height: 40px;
    }
}

/* Modal z operatorami */
.operator-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    display: none;
}

.operator-modal-overlay.active {
    display: block;
}

.operator-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 9999;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
}

.operator-modal h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    text-align: center;
    color: #2c3e50;
}

.operator-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.operator-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.operator-item:hover {
    border-color: #f5b5b5;
    background: #fafafa;
    transform: translateX(4px);
}

.operator-item.selected {
    border-color: #f5b5b5;
    background: #fff5f5;
    box-shadow: 0 2px 8px rgba(245, 181, 181, 0.3);
}

.operator-avatar {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px;
    min-height: 50px;
    max-width: 50px;
    max-height: 50px;
    border-radius: 50% !important;
    object-fit: cover;
    border: 2px solid #f5b5b5;
    flex-shrink: 0;
}

.operator-item .operator-name {
    flex: 1;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
}

.operator-item .operator-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f0f0;
    border: 2px solid #ddd;
    flex-shrink: 0;
}

.operator-item .operator-icon svg {
    display: block;
    flex-shrink: 0;
}

.operator-modal-close {
    margin-top: 15px;
    width: 100%;
    padding: 10px;
    background: #ddd;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.operator-modal-close:hover {
    background: #ccc;
}

/* Stara klasa select - ukrywamy */
.operator-select {
    display: none;
}

.fc-day-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    line-height: 1.2;
}

.fc-day-header .fc-dzien {
    font-weight: bold;
}

.fc-day-header .fc-data {
    font-size: 14px;
    margin: 2px 0;
}

.fc-day-header .fc-miesiac {
    color: #555;
}

.vip-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9998;
}

.vip-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 9999;
  width: 90%;
  max-width: 320px;
  text-align: center;
  font-family: inherit;
}

.vip-modal h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.vip-modal-actions button {
  margin: 5px;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

#vipDeleteBtn {
  background: #f44336;
  color: white;
}

#vipEditBtn {
  background: #2196f3;
  color: white;
}

#vipCloseBtn {
  background: #ddd;
}

#availDeleteBtn {
  background: #f44336;
  color: white;
}

#availEditBtn {
  background: #2196f3;
  color: white;
}

#vipCloseBtn2 {
  background: #ddd;
}

/* ---- Poprawiona sekcja VIP (nie używa 100vw; eliminuje poziome przewijanie) ---- */
.woocommerce-MyAccount-content #vip-wrapper,
.woocommerce-MyAccount-content .vip-wrapper,
#smart-calendar-wrapper.full-bleed,
#smartcalendar-wrapper.full-bleed {
  position: relative;            /* zachowuje kontekst, ale przesuwamy na środek viewportu */
  left: 50%;
  right: 50%;
  margin-left: -50vw;            /* centrowanie i rozszerzenie poza kontener */
  margin-right: -50vw;
  width: 100vw;                  /* pełna szerokość widoku */
  max-width: 100vw;
  box-sizing: border-box;
  padding-left: 18px;            /* opcjonalne wewnętrzne odstępy */
  padding-right: 18px;
  background: transparent;
  z-index: 0;
}


/* Małe poprawki dla elementów FullCalendar - pozwól kolumnom się kurczyć */
.fc .fc-timegrid-col,
.fc .fc-scrollgrid-section-liquid {
  min-width: 0;
}

/* Pozwól wewnętrznemu scrollerowi przewijać się poziomo zamiast body */
.fc .fc-scroller {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- helper styles for normalized footer --- */
.calendar-summary-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  box-sizing: border-box;
}

/* items inside footer - default compact behavior */
.calendar-summary-inner > * {
  min-width: 0;
  box-sizing: border-box;
  flex: 0 1 auto;
}

/* responsive footer items (buttons/inputs) */
.responsive-footer-item {
  flex: 0 1 220px; /* base width, can shrink */
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* label wrappers and checkboxes */
.calendar-summary-inner label,
.calendar-summary-inner .checkbox-label {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  flex: 0 1 auto;
  min-width: 0;
}

/* ---------- recurring icon (small) ---------- */
.recurring-icon {
  font-size: 0.85em;            /* mniejsza niż główny tekst w evencie */
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  color: inherit;               /* dziedziczy kolor tekstu eventu */
  opacity: 0.95;
  pointer-events: none;         /* nie blokuje kliknięć eventu */
}

/* fallback absolute positioning if title element not found */
.recurring-icon-abs {
  position: absolute;
  top: 3px;
  right: 6px;
  font-size: 0.75em;
  opacity: 0.95;
  pointer-events: none;
  color: inherit;
  background: transparent;
}




/* Breakpoint -> stack vertically on narrow screens */
@media (max-width: 900px) {
  .calendar-summary-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .responsive-footer-item {
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  .calendar-summary-inner label,
  .calendar-summary-inner .checkbox-label {
    width: 100%;
    flex: 1 1 100%;
  }
}

/* ---- Responsywne przyciski i footer dla widoku mobilnego VIP ---- */
@media (max-width: 768px) {

  /* Zmniejszamy marginesy głównego wrappera na mobile */
  #smart-calendar-wrapper,
  #smartcalendar-wrapper {
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Podsumowanie na mobile - zachowaj styling ale dostosuj padding */
  #calendar-summary {
    padding: 15px;
    margin-top: 15px;
  }

  #slots-list p strong {
    font-size: 15px;
  }

  #slots-list p:not(:has(strong)) {
    padding: 6px 10px;
    font-size: 14px;
  }

  #add-to-cart-summary {
    padding: 10px 20px;
    font-size: 15px;
  }

  /* Uporządkuj footer/podsumowanie: kolumnowo, przyciski na 100% szerokości */
#calendar-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
}

/* Każde dziecko może się kurczyć (nie rozszerzać kontenera) */
#calendar-summary > * {
  min-width: 0;
  box-sizing: border-box;
  flex: 0 1 auto;
}

/* Główny przycisk (identyfikator używany w JS) - ustalamy rozsądną bazę, ale pozwalamy mu kurczyć się */
#add-to-cart-summary,
#calendar-summary button#add-to-cart-summary,
#calendar-summary .button#add-to-cart-summary {
  flex: 0 1 220px;   /* domyślna szerokość bazowa */
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Jeżeli przyciski mają inną klasę/fallback - trafiamy też w szerokie selektory */
#calendar-summary .button,
#calendar-summary button,
.vip-footer-controls .button,
.vip-modal-actions button {
  min-width: 0;
  box-sizing: border-box;
  flex: 0 1 auto;
}

/* Wiersze kontrolne (checkboxy, labelki) - elastyczne, zawijają dziecko gdy brak miejsca */
#calendar-summary .vip-footer-row,
#calendar-summary .vip-controls-row,
.vip-footer-row,
.vip-controls-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1 1 240px;   /* staramy się zabrać pozostałą przestrzeń, ale możemy zawinąć */
  min-width: 0;
  box-sizing: border-box;
}

/* Etykiety checkboxów: pozwól im zawijać się, nie popychając layoutu */
#calendar-summary label,
.vip-footer-row .checkbox-label,
.vip-controls-row .checkbox-label {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  flex: 0 1 auto;
  min-width: 0;
  box-sizing: border-box;
}

/* Checkboxy same w sobie nie powinny się rozciągać */
#calendar-summary input[type="checkbox"],
.vip-footer-row input[type="checkbox"],
.vip-controls-row input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0 6px 0 0;
  box-sizing: border-box;
}


  /* Zmniejsz padding slotów aby mieściły się więcej na ekranie */
  .day-slot-btn {
    font-size: 13px;
    padding: 6px 8px;
    margin: 2px;
  }

  /* Ułatwiamy przewijanie kalendarza (poziome wewnętrzne przewijanie jeśli potrzebne) */
  .fc {
    -webkit-overflow-scrolling: touch;
  }

  /* Jeśli przycisk "Zatwierdź dyspozycję" jest poza kontenerem, upewnij się, że nie jest przyklejony do krawędzi */
  .calendar-topbar,
  .calendar-nav,
  .calendar-btn {
    flex-shrink: 0;
  }

  /* Drobne korekty layoutu FullCalendar na węższych ekranach */
  .fc .fc-timegrid-axis { 
    padding-left: 4px;
    padding-right: 4px;
    min-width: 28px;
  }
  .fc .fc-timegrid-col {
    min-width: 60px; /* umożliwia kolumnom kurczyć się ale pozostać czytelnymi */
  }

}

/* ---------- RESPONSYWNOŚĆ dla bardzo małych ekranów (legacy) ---------- */
@media (max-width: 600px) {
    #smartcalendar-wrapper {
        margin: 10px auto;
        padding: 0 5px;
    }

    /* Podsumowanie - kompaktowy widok na małych ekranach */
    #calendar-summary {
        padding: 12px;
        margin-top: 12px;
    }

    #slots-list p strong {
        font-size: 14px;
        padding-bottom: 4px;
    }

    #slots-list p:not(:has(strong)) {
        padding: 5px 8px;
        font-size: 13px;
        margin-left: 0;
    }

    #add-to-cart-summary {
        padding: 10px 16px;
        font-size: 14px;
    }

    .calendar-topbar {
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
        flex-wrap: nowrap;
    }
    
    .calendar-nav {
        width: 40px;
        height: 40px;
        line-height: 40px;
        flex-shrink: 0;
    }
    
    .calendar-nav.prev {
        order: 1;
    }
    
    .calendar-switch {
        order: 2;
        flex-direction: column;
        gap: 0;
        margin-bottom: 0;
        flex: 1;
    }
    
    .calendar-nav.next {
        order: 3;
    }

    .calendar-btn {
        padding: 0 8px;
        font-size: 12px;
        height: 100%;
        flex: 1;
        width: 100%;
    }

    .calendar-title {
        font-size: 16px;
        line-height: 40px;
    }

    .calendar-today-btn {
        padding: 0 10px;
        font-size: 13px;
        height: 40px;
    }

    .day-slot-btn {
        font-size: 12px;
        padding: 3px 6px;
        margin: 2px;
    }

    #calendar-summary > * {
    width: 100%;
    flex: none;
  }

  /* Przyciski stają się blokowe i zajmują całą szerokość */
  #add-to-cart-summary,
  #calendar-summary button#add-to-cart-summary,
  #calendar-summary .button#add-to-cart-summary {
    flex: 1 1 100%;
    width: 100%;
    display: block;
  }
#add-to-cart-summary,
  #calendar-summary button#add-to-cart-summary,
  #calendar-summary .button#add-to-cart-summary {
    flex: 1 1 100%;
    width: 100%;
    display: block;
  }

  /* kontrolki/checkboxy -> druga linia pełna szerokość */
  #calendar-summary .vip-footer-row,
  #calendar-summary .vip-controls-row,
  .vip-footer-row,
  .vip-controls-row {
    flex: 1 1 100%;
    width: 100%;
  }

  /* jeśli etykiety dalej zachowują się dziwnie, wymuśmy by brały pełną linię */
  #calendar-summary label,
  .vip-footer-row .checkbox-label,
  .vip-controls-row .checkbox-label {
    flex: 1 1 100%;
    width: 100%;
  }
  /* kontrolki/checkboxy -> druga linia pełna szerokość */
  #calendar-summary .vip-footer-row,
  #calendar-summary .vip-controls-row,
  .vip-footer-row,
  .vip-controls-row {
    flex: 1 1 100%;
    width: 100%;
  }

  /* jeśli etykiety dalej zachowują się dziwnie, wymuśmy by brały pełną linię */
  #calendar-summary label,
  .vip-footer-row .checkbox-label,
  .vip-controls-row .checkbox-label {
    flex: 1 1 100%;
    width: 100%;
  }

    .calendar-today-btn {
    position: absolute;
    right: 0;      /* wyrównanie do prawej */
    background: #000;
    color: #fff;
    padding: 4px 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}
}

/* ---- Drobne poprawki ogólne ---- */
.pcb-blocked-message a,
.vip-modal a {
  color: #0073aa;
}

/* Upewnij się, że modal ma responsywną szerokość */
.vip-modal {
  width: 92%;
  max-width: 420px;
  padding: 16px;
}

/* ---------- MOBILE FIX: checkboxy nie wypychają footeru (<=500px) ---------- */
@media (max-width: 500px) {
  /* Upewnij się, że footer kontrolny jest kolumnowy i elementy nie pchają się w jednym wierszu */
  #calendar-summary,
  .calendar-summary-inner,
  #vip-footer-controls,
  #vip-footer-controls > div,
  .vip-footer-row,
  .vip-controls-row,
  #calendar-summary .vip-footer-row,
  #calendar-summary .vip-controls-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Przyciski zajmują pełną szerokość i nie mają inline-widthów */
  #add-to-cart-summary,
  .responsive-footer-item,
  #vip-footer-controls button,
  #vip-footer-controls .button,
  #calendar-summary .button,
  #calendar-summary button {
    width: 100% !important;
    flex: 1 1 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
  }

  /* Labelki checkboxów: pełna szerokość, tekst zawija się bez rozpychania */
  .vip-footer-row .checkbox-label,
  .vip-controls-row .checkbox-label,
  #calendar-summary label,
  #vip-footer-controls label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-direction: row !important; /* checkbox + tekst obok, ale cały blok ma 100% szerokości */
    width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
    padding: 6px 8px !important;
    margin: 0 !important;
  }

  /* Checkbox sam w sobie - mały, nie rozciąga */
  .vip-footer-row .checkbox-label input[type="checkbox"],
  .vip-controls-row .checkbox-label input[type="checkbox"],
  #calendar-summary input[type="checkbox"],
  #vip-footer-controls input[type="checkbox"] {
    flex: 0 0 auto !important;
    margin: 0 8px 0 0 !important;
    transform: scale(0.95) !important;
    box-sizing: border-box !important;
  }

  /* Tekst wewnątrz labela może być mniejszy, żeby zmieścić się lepiej */
  .vip-footer-row .checkbox-label span,
  .vip-controls-row .checkbox-label span,
  #calendar-summary label span {
    display: block !important;
    flex: 1 1 auto !important;
    font-size: 14px !important;
    line-height: 1.1 !important;
    word-break: break-word !important;
  }

  /* Safety: zapobiegamy overflow przez inline-styles lub inne reguły */
  #calendar-summary * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}