/**
 * shared.css - STATE-ONLY
 *
 * ZASADY:
 * 1. Tylko STAN (display/opacity/transition), NIGDY layout (position/width/height)
 *    -> layout pochodzi z compiled.css (klasy Tailwind z JSX)
 * 2. Tylko selektory klas (.foo), nigdy atrybutów
 * 3. .bg-video BEZ position/width/height (sizing = inline style z theme_youtube_embed)
 */

/* ====== Accordion (FAQItem) ====== */
.js-accordion-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

/* ====== Body scroll lock ====== */
body.mobile-menu-open,
body.modal-open {
    overflow: hidden;
}

/* ====== Mobile menu (Navbar) ====== */
.js-mobile-menu {
    display: none;
}
.js-mobile-menu.is-open {
    display: flex;
}

/* ====== Modal / Lightbox ====== */
.js-modal {
    display: none;
}
.js-modal.is-open {
    display: flex;
}

/* ====== Slideshow (Slideshow.tsx, Audience rotator) ====== */
.js-hero-slide {
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
}
.js-hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

/* Rotator w sekcji Audience - crossfade 0.8s (motion: duration 0.8) */
.js-slider-fade .js-slide {
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}
.js-slider-fade .js-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

/* ====== Tabs ====== */
.js-tab-content {
    display: none;
}
.js-tab-content.is-active {
    display: block;
}

/* ====== Toggle "Zobacz wiecej udogodnien" (BookingPage) ====== */
.js-toggle-item.is-hidden {
    display: none;
}

/* ====== Header scroll (Navbar isScrolled) ====== */
.js-scroll-header {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

/* ====== Lightbox fade-in obrazu ====== */
.js-lightbox-image {
    transition: opacity 0.2s ease;
}

/* ====== iframe responsive ====== */
iframe:not(.bg-video):not([data-bg-video]) {
    max-width: 100%;
}

/* ====== .bg-video ======
   object-fit NIE dziala na iframe.
   Sizing wstawiany inline w theme_youtube_embed(bg=true).
   Tu TYLKO border + blokada interakcji. */
.bg-video,
[data-bg-video] {
    border: 0;
    pointer-events: none;
}

/* ====== Icon SVG (theme_icon) ====== */
.icon-svg {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ====== Contact Form 7 (odwzorowanie makiety ContactForm 1:1) ======
   Wartości = odpowiedniki klas Tailwind z oryginalnego formularza. */
.dpn-cf7 > p,
.dpn-cf7 > div {
    margin-bottom: 0.75rem; /* space-y-3 */
}
.dpn-cf7 > p:last-of-type,
.dpn-cf7 > div:last-of-type {
    margin-bottom: 0;
}
/* CF7 owija każde pole w <span class="wpcf7-form-control-wrap"> - rozciągamy na całość */
.dpn-cf7 .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}
.dpn-cf7 .dpn-input {
    width: 100%;
    background-color: var(--color-sand-50, #fcfbf9);
    border: 1px solid var(--color-stone-200, #e7e5e4);
    padding: 0.5rem 0.75rem; /* py-2 px-3 */
    color: var(--color-stone-800, #292524);
    font-size: 0.875rem; /* text-sm */
    line-height: 1.25rem;
    transition: border-color 0.3s ease, color 0.3s ease;
}
.dpn-cf7 .dpn-input:focus {
    outline: none;
    border-color: var(--color-olive-500, #78716c);
}
.dpn-cf7 input[type="date"].dpn-input {
    padding-left: 0.5rem;  /* px-2 dla pól daty */
    padding-right: 0.5rem;
}
.dpn-cf7 .dpn-textarea {
    resize: none;
}
.dpn-cf7 .dpn-submit {
    width: 100%;
    margin-top: 0.25rem; /* mt-1 */
    padding: 0.875rem 0; /* py-3.5 */
    background-color: #FBD503;
    color: #000;
    font-size: 0.6875rem; /* text-[11px] */
    font-weight: 600;
    letter-spacing: 0.1em; /* tracking-widest */
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem; /* gap-2 */
    border: 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
@media (min-width: 640px) {
    .dpn-cf7 .dpn-submit {
        font-size: 0.75rem; /* sm:text-xs */
    }
}
.dpn-cf7 .dpn-submit:hover {
    background-color: #e6c200;
}
.dpn-cf7 .dpn-submit svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}
/* Komunikaty walidacji CF7 - subtelne, w duchu motywu */
.dpn-cf7 .wpcf7-not-valid-tip {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
.dpn-cf7 .wpcf7-response-output {
    margin: 0.75rem 0 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
}

/* ====== Custom scrollbar (Navbar contact modal: .custom-scrollbar) ====== */
.custom-scrollbar {
    scrollbar-width: thin;
}
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: rgba(120, 113, 108, 0.4);
    border-radius: 3px;
}
