/* --- Design tokens (minimal-industrial) --- */
:root {
    --sh-bg: #fff;
    --sh-fg: #111;
    --sh-accent: #888;
    --sh-line: #e0e0e0;
    --sh-hover: #f0f0f0;
}

/* --- GŁÓWNE USTAWIENIA --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--sh-bg);
    color: var(--sh-fg);
    scroll-behavior: smooth;
}

.nip-lookup-feedback:not(:empty) {
    margin-top: -0.25rem;
}

.nip-lookup-feedback--success {
    color: #15803d;
    font-weight: 500;
}

.nip-lookup-feedback--error {
    color: #b45309;
}

.nip-lookup-feedback--muted {
    color: #71717a;
}

.hero-bg {
    background-color: #fafafa;
}

.hero-figure {
    position: relative;
}

/* Mobile: brak logo na zdjęciu — wordmark w nav. Od md: logo ~70% szer./wys. kadru zdjęcia. */
.hero-figure__overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(0.5rem, 2vw, 1.25rem);
}

@media (min-width: 768px) {
    .hero-figure__overlay {
        display: flex;
    }

    /* Nakładka: wcześniej 70% kadru — zmniejszenie do ~49% (= 70% z 70%) */
    .hero-overlay-logo {
        width: 49%;
        max-width: 49%;
        max-height: 49%;
        height: auto;
        object-fit: contain;
        filter: brightness(0) invert(1) drop-shadow(0 2px 28px rgba(0, 0, 0, 0.55));
    }
}

/* Jedyny „miękki” cień na karcie podsumowania rezerwacji */
.booking-sidebar-card {
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.06);
    border-radius: 2px;
}

/* Podsumowanie rezerwacji */
.summary-pay-separator {
    height: 1px;
    background: var(--sh-line);
    margin-top: 0.25rem;
    margin-bottom: 0.35rem;
}

.summary-pay-amount {
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--sh-fg);
    line-height: 1.1;
}

.summary-value {
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.summary-value--pending {
    min-width: 4.25rem;
    min-height: 1.125rem;
    border-radius: 2px;
    color: transparent !important;
    background: linear-gradient(90deg, #eee 0%, #f5f5f5 50%, #eee 100%);
    background-size: 200% 100%;
    animation: summaryPulse 1.15s ease-in-out infinite;
}

@keyframes summaryPulse {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.summary-value--flash {
    animation: summaryValueFlash 0.45s ease-out;
}

#summary-price.summary-value--flash {
    animation: summaryValueFlash 0.45s ease-out;
}

@keyframes summaryValueFlash {
    from {
        opacity: 0.35;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.submit-booking-btn {
    width: 100%;
    padding: 1.25rem 1rem;
    border: none;
    border-radius: 2px;
    background: #111;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    cursor: pointer;
    transition: background-color 150ms ease, opacity 150ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
}

.submit-booking-btn:hover:not(:disabled):not(.is-loading) {
    background-color: #333;
}

.submit-booking-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.submit-booking-btn.is-loading {
    cursor: progress;
}

.submit-booking-btn.is-loading .submit-booking-btn__idle {
    display: none !important;
}

.submit-booking-btn.is-loading .submit-booking-btn__busy {
    display: inline-flex !important;
}

.submit-booking-btn__busy {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 0.22em;
    font-size: 10px;
}

.submit-booking-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bookingSpin 0.65s linear infinite;
}

@keyframes bookingSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Obudowa kalendarza — padding ~35% mniejszy niż poprzednie 16px */
.calendar-shell {
    padding: 10px;
}

@media (min-width: 768px) {
    .calendar-shell {
        padding: 12px;
    }
}

/* --- KALENDARZ (FullCalendar editorial) --- */
.fc {
    border: none !important;
    max-width: 520px;
    margin: 0 auto;
    --fc-border-color: var(--sh-line);
}

.fc .fc-toolbar-title {
    font-weight: 700;
    font-size: 0.875rem !important;
    letter-spacing: 0.08em;
}

.fc-direction-ltr .fc-button-group > .fc-button {
    margin-left: 2px;
}

.fc .fc-button {
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 8px !important;
    border-radius: 2px !important;
    background: var(--sh-bg) !important;
    border: 1px solid var(--sh-line) !important;
    color: var(--sh-fg) !important;
    text-transform: uppercase;
    font-size: 10px !important;
    letter-spacing: 0.1em;
    transition: background-color 150ms ease-out, border-color 150ms ease-out;
}

.fc .fc-button:hover {
    background: var(--sh-hover) !important;
    border-color: var(--sh-fg) !important;
}

.fc .fc-button:focus {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
    outline: none;
}

.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: var(--sh-fg) !important;
    color: var(--sh-bg) !important;
}

/* Nagłówki dni tygodnia — stagger tylko pierwszy render widoku */
.fc-col-header-cell {
    opacity: 0;
    animation: fcHeadingIn 0.4s ease-out forwards;
}

.fc-col-header-cell:nth-child(1) { animation-delay: 0.02s; }
.fc-col-header-cell:nth-child(2) { animation-delay: 0.04s; }
.fc-col-header-cell:nth-child(3) { animation-delay: 0.06s; }
.fc-col-header-cell:nth-child(4) { animation-delay: 0.08s; }
.fc-col-header-cell:nth-child(5) { animation-delay: 0.1s; }
.fc-col-header-cell:nth-child(6) { animation-delay: 0.12s; }
.fc-col-header-cell:nth-child(7) { animation-delay: 0.14s; }

@keyframes fcHeadingIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.fc-col-header-cell-cushion {
    text-transform: uppercase;
    font-size: 9px !important;
    font-weight: 500;
    letter-spacing: 0.1em !important;
    color: #999 !important;
    padding: 4px 0 !important;
}

@media (min-width: 768px) {
    .fc-col-header-cell-cushion {
        font-size: 10px !important;
        padding: 6px 0 !important;
    }
}

/* Komórki: 32px mobile, 36px desktop; cyfra 13px */
.fc-daygrid-day {
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 2px !important;
    min-height: 32px !important;
    cursor: pointer;
    transition: background-color 150ms ease-out;
}

@media (min-width: 768px) {
    .fc-daygrid-day {
        min-height: 36px !important;
    }
}

.fc-daygrid-day-frame {
    min-height: 32px;
}

@media (min-width: 768px) {
    .fc-daygrid-day-frame {
        min-height: 36px;
    }
}

.fc-daygrid-day-number {
    font-size: 13px !important;
    font-weight: 450;
    color: var(--sh-fg);
    opacity: 1 !important;
    padding: 2px 4px !important;
}

.fc-daygrid-day:not(.fc-day-disabled):not(.selected-day):hover {
    background-color: var(--sh-hover) !important;
}

/* Dziś: akcent obramowaniem od dołu (nie konkuruje z wyborem) */
.fc-day-today:not(.selected-day) {
    background: transparent !important;
}

.fc-day-today:not(.selected-day) .fc-daygrid-day-frame {
    border-bottom: 2px solid #111;
}

/* Wybrany dzień */
.selected-day {
    background-color: var(--sh-fg) !important;
}

.selected-day .fc-daygrid-day-number {
    color: #fff !important;
    font-weight: 700;
}

/* Niedostępne (przeszłe / poza zakresem) */
.fc-day-disabled {
    background-color: rgba(0, 0, 0, 0.02) !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

.fc-day-disabled .fc-daygrid-day-number {
    color: #ccc !important;
}

.fc-day-other {
    visibility: hidden;
}

/* --- Formularz rezerwacji: floating labels + natywne selecty czasu --- */
.floating-field {
    position: relative;
}

.floating-field__input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--sh-line);
    border-radius: 2px;
    font-size: 14px;
    color: var(--sh-fg);
    background-color: var(--sh-bg);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.floating-field__input:focus {
    outline: none;
    border-color: var(--sh-fg);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.floating-field__input::placeholder {
    color: transparent;
}

.floating-field__label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--sh-accent);
    pointer-events: none;
    transition: top 175ms ease, transform 175ms ease, font-size 175ms ease, color 175ms ease;
    background: linear-gradient(to bottom, var(--sh-bg) 55%, transparent 55%);
    padding: 0 4px;
    margin-left: -4px;
    max-width: calc(100% - 28px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-field__input:focus + .floating-field__label,
.floating-field__input:not(:placeholder-shown) + .floating-field__label {
    top: 0;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--sh-fg);
}

.people-stepper {
    width: 100%;
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    border: 1px solid var(--sh-line);
    border-radius: 2px;
    background: var(--sh-bg);
    color: var(--sh-fg);
    font-size: 14px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.people-stepper:focus-within {
    border-color: var(--sh-fg);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.people-stepper__button {
    height: 100%;
    min-height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--sh-fg);
    font: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: color 150ms ease, opacity 150ms ease;
}

.people-stepper__button:hover:not(:disabled),
.people-stepper__button:focus-visible:not(:disabled) {
    color: var(--sh-accent);
}

.people-stepper__button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.people-stepper__input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--sh-fg);
    font: inherit;
    font-size: 14px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.people-stepper__input:focus {
    outline: none;
}

select.select-visually-hidden {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: none !important;
}

.custom-dropdown {
    position: relative;
}

/* Dropdown nad kolejnymi sekcjami (footer): .reveal-on-scroll tworzy stacking context — cała #rezerwacja musi być wyżej niż #kontakt */
#rezerwacja {
    position: relative;
    z-index: 40;
}

footer#kontakt {
    position: relative;
    z-index: 20;
}

.custom-dropdown__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--sh-line);
    border-radius: 2px;
    background: var(--sh-bg);
    font-size: 14px;
    color: var(--sh-fg);
    text-align: left;
    cursor: pointer;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.custom-dropdown__trigger:hover:not(:disabled) {
    border-color: #ccc;
}

.custom-dropdown__trigger:focus {
    outline: none;
    border-color: var(--sh-fg);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08);
}

.custom-dropdown.is-open .custom-dropdown__trigger {
    border-color: var(--sh-fg);
}

.custom-dropdown__chevron {
    flex-shrink: 0;
    color: var(--sh-accent);
    transition: transform 200ms ease;
    display: flex;
}

.custom-dropdown.is-open .custom-dropdown__chevron {
    transform: rotate(180deg);
}

.custom-dropdown__value {
    flex: 1;
    min-height: 1.25rem;
}

.custom-dropdown__panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 60;
    max-height: 240px;
    overflow-y: auto;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: var(--sh-bg);
    border: 1px solid var(--sh-line);
    border-radius: 2px;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.06);
}

.custom-dropdown__panel li {
    padding: 12px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 120ms ease;
}

.custom-dropdown__panel li:hover,
.custom-dropdown__panel li:focus {
    background-color: #f5f5f5;
    outline: none;
}

.custom-dropdown__panel li.is-active {
    font-weight: 600;
}

.custom-dropdown.dropdown--disabled .custom-dropdown__trigger {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Płynne pojawianie się sekcji */
.step-hidden { 
    display: none; 
    opacity: 0;
}

.step-visible { 
    display: block !important; 
    opacity: 1;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.sticky { background-color: #fafafa; border: 1px solid #eaeaea; }

/* Sekcje: lekki fade-in przy pierwszym wejściu w viewport (hero wyłączony) */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* RESET DLA CHECKBOXÓW - usuwamy te "kreski" */
input[type="checkbox"].custom-checkbox {
    appearance: none !important; /* Wyłączamy domyślny wygląd */
    -webkit-appearance: none;
    width: 18px !important;
    height: 18px !important;
    border: 1px solid #1a1a1a !important; /* Czarna ramka */
    background-color: #ffffff !important;
    border-radius: 2px !important;
    cursor: pointer;
    position: relative;
    display: inline-block;
    flex-shrink: 0; /* Żeby się nie zgniatały w flexboxie */
}

/* Wygląd po zaznaczeniu (Ptaszek) */
input[type="checkbox"].custom-checkbox:checked {
    background-color: #1a1a1a !important;
}

input[type="checkbox"].custom-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* 1. Stan najechania na PUSTY checkbox */
input[type="checkbox"].custom-checkbox:hover:not(:checked) {
    border-color: #000 !important;
    background-color: #f0f0f0 !important; /* Delikatne szare tło sugerujące interakcję */
}

/* 2. Stan najechania na ZAZNACZONY checkbox */
/* To rozwiązuje Twój problem - tło zostaje czarne, więc biały ptaszek jest widoczny */
input[type="checkbox"].custom-checkbox:checked:hover {
    background-color: #1a1a1a !important;
    opacity: 0.8; /* Lekkie przyciemnienie zamiast zmiany koloru na biały */
}

/* 3. Dodatkowo: efekt kliknięcia (active) */
input[type="checkbox"].custom-checkbox:active {
    transform: scale(0.95); /* Lekkie "wciśnięcie" pod palcem/myszką */
}