/* ========================================
   Calendar Widget
======================================== */
.hospitable-calendar-widget {
    margin: 40px 0;
    width: 100%;
}

.hospitable-calendar-wrapper {
    position: relative;
    width: 100%;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    overflow: hidden;
}

.hospitable-calendar-wrapper iframe {
    width: 100%;
    min-height: 600px;
    border: none;
    border-radius: 8px;
    display: block;
}

.hospitable-calendar-error {
    text-align: center;
    border-radius: 8px;
    padding: 10px;
}

.hospitable-calendar-error p {
    font-size: 13px;
    color: #000000;
    margin: 0 !important;
}

/* ========================================
   Amenities Shortcode Styles
======================================== */


.hospitable-amenities-wrapper {
    margin: 40px 0;
    width: 100%;
}

.hospitable-amenities-error,
.hospitable-amenities-empty {
    text-align: center;
    padding: 40px 20px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    margin: 40px 0;
}

.hospitable-amenities-error p,
.hospitable-amenities-empty p {
    font-size: 16px;
    color: #856404;
    margin: 0;
}

.hospitable-amenities-grouped {
    display: grid;
    gap: 30px;
}

.amenity-category {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.amenity-category:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.amenity-category-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #0066cc;
}

.amenity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
}

.hospitable-amenities-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}


.amenity-item {
    display: flex;
    align-items: flex-start;
    gap: 2px;
    padding: 0 0 20px 0;
    border-bottom: 1px solid #ccc;
    flex-direction: column !important;
}


.amenity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}


.amenity-name {
    color: #000000;
    font-size: 18px;
    line-height: 1.5;
    font-weight: 500;
}

.amenity-description {
    display: block;
    font-size: 16px;
    color: #000000;
    margin-top: 4px;
    line-height: 1.4;
    padding: 0 40px;
}

/* ========================================
   Gallery Slider Widget
======================================== */

.hospitable-gallery-widget {
    margin: 40px 0 !important;
    width: 100% !important;
}

.hospitable-gallery-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
}

.hospitable-gallery-main {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000000;
    height: 540px;
    line-height: 0;
    cursor: zoom-in;

}

.hospitable-gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.hospitable-gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.hospitable-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.hospitable-gallery-prev,
.hospitable-gallery-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.88);
    color: #000000;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 2 !important;
    padding: 0 !important;
}

.hospitable-gallery-prev {
    left: 14px !important;
}

.hospitable-gallery-next {
    right: 14px !important;
}

.hospitable-gallery-prev:hover,
.hospitable-gallery-next:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.hospitable-gallery-prev:focus-visible,
.hospitable-gallery-next:focus-visible {
    outline: 3px solid #0066cc !important;
    outline-offset: 2px !important;
}

.hospitable-gallery-prev:active,
.hospitable-gallery-next:active {
    transform: translateY(-50%) scale(0.96) !important;
}

.hospitable-gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.52);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 20px;
    pointer-events: none;
    letter-spacing: 0.02em;
}

.hospitable-gallery-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 540px;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.hospitable-gallery-thumbnails::-webkit-scrollbar {
    display: none;
}

.hospitable-gallery-thumb {
    position: relative;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    background: #e5e7eb;
    line-height: 0;
    outline: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.hospitable-gallery-thumb:hover {
    border-color: rgba(0, 0, 0, 0.6);
    transform: scale(1.02);
}

.hospitable-gallery-thumb:focus-visible {
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.3);
}

.hospitable-gallery-thumb.active {
    border-color: #000000;
}

.hospitable-gallery-thumb img {
    width: 100%;
    height: 167px;
    object-fit: cover;
    display: block;
}

.hospitable-gallery-error {
    text-align: center;
    padding: 40px 20px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    margin: 40px 0;
}

.hospitable-gallery-error p {
    font-size: 16px;
    color: #856404;
    margin: 0;
}


.hospitable-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hospitable-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.hospitable-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
}

.hospitable-lightbox-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: min(92vw, 1200px);
    width: 100%;
    padding: 0 60px;
    box-sizing: border-box;
}

.hospitable-lightbox-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 80vh;
    line-height: 0;
}

.hospitable-lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 12px 60px rgba(0, 0, 0, 0.7);
    display: block;
    transition: opacity 0.2s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.hospitable-lightbox-img.is-loading {
    opacity: 0;
}

.hospitable-lightbox-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 0 0;
    gap: 20px;
    min-height: 40px;
}

.hospitable-lightbox-caption {
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
    min-width: 0;
    text-align: center;
}

.hospitable-lightbox-counter {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.hospitable-lightbox-close {
    position: fixed !important;
    top: 18px !important;
    right: 18px !important;
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.25) !important;
    background: rgba(0, 0, 0, 0.4) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease !important;
    z-index: 2 !important;
    padding: 0 !important;
}

.hospitable-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: scale(1.08) !important;
}

.hospitable-lightbox-close:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.7) !important;
    outline-offset: 2px !important;
}

.hospitable-lightbox-prev,
.hospitable-lightbox-next {
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(0, 0, 0, 0.35) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease !important;
    z-index: 2 !important;
    padding: 0 !important;
}

.hospitable-lightbox-prev {
    left: 18px !important;
}

.hospitable-lightbox-next {
    right: 18px !important;
}

.hospitable-lightbox-prev:hover,
.hospitable-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-50%) scale(1.08) !important;
}

.hospitable-lightbox-prev:focus-visible,
.hospitable-lightbox-next:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.7) !important;
    outline-offset: 2px !important;
}

.hospitable-lightbox-prev:active,
.hospitable-lightbox-next:active {
    transform: translateY(-50%) scale(0.94) !important;
}


/* ========================================
   Responsive Design
======================================== */

/* Calendar Widget - Mobile */
@media screen and (max-width: 480px) {
    .hospitable-calendar-widget {
        margin: 20px 0;
    }

    .hospitable-calendar-wrapper {
        padding: 12px;
    }

    .hospitable-calendar-wrapper iframe {
        min-height: 500px;
    }
}

/* Amenities - Tablet Portrait (768px and below) */
@media screen and (max-width: 768px) {
    .hospitable-amenities-wrapper {
        margin: 24px 0;
    }

    .amenity-category {
        padding: 20px;
    }

    .amenity-category-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .amenity-name {
        font-size: 16px;
    }

    .amenity-description {
        font-size: 12px;
    }
}

/* Amenities - Mobile (480px and below) */
@media screen and (max-width: 480px) {
    .hospitable-amenities-wrapper {
        margin: 20px 0;
    }

    .amenity-category {
        padding: 16px;
    }

    .amenity-category-title {
        font-size: 15px;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .amenity-list {
        gap: 10px;
    }

    .amenity-item {
        padding: 6px 0;
    }

    .amenity-icon {
        font-size: 14px;
    }

    .amenity-name {
        font-size: 14px;
    }

    .amenity-description {
        font-size: 11px;
    }
}

/* Gallery Slider – Tablet Landscape (1024px and below) */
@media screen and (max-width: 1024px) {
    .hospitable-gallery-main {
        height: 500px;
    }

    .hospitable-gallery-thumbnails {
        height: 500px;
        /* matches main */
    }

    .hospitable-gallery-thumb img {
        height: 154px;
    }
}

@media screen and (max-width: 768px) {
    .hospitable-gallery-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    .hospitable-gallery-main {
        width: 100% !important;
        height: 400px !important;
    }

    /* Thumbnails become a horizontal scrollable row below the main image */
    .hospitable-gallery-thumbnails {
        width: 100% !important;
        height: auto !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 12px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        flex-wrap: nowrap !important;
        padding-bottom: 8px !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .hospitable-gallery-thumbnails::-webkit-scrollbar {
        height: 6px !important;
    }

    .hospitable-gallery-thumbnails::-webkit-scrollbar-track {
        background: #f1f1f1 !important;
        border-radius: 3px !important;
    }

    .hospitable-gallery-thumbnails::-webkit-scrollbar-thumb {
        background: #888 !important;
        border-radius: 3px !important;
    }

    .hospitable-gallery-thumbnails::-webkit-scrollbar-thumb:hover {
        background: #555 !important;
    }

    .hospitable-gallery-thumb {
        flex: 0 0 120px !important;
        width: 120px !important;
        height: 120px !important;
    }

    .hospitable-gallery-thumb img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .hospitable-gallery-prev {
        left: 10px;
    }

    .hospitable-gallery-next {
        right: 10px;
    }
}

/* Gallery Slider – Mobile (480px and below) */
@media screen and (max-width: 480px) {
    .hospitable-gallery-widget {
        margin: 20px 0;
    }

    .hospitable-gallery-main {
        height: 280px !important;
    }

    .hospitable-gallery-thumbnails {
        gap: 8px !important;
    }

    /* Smaller thumbnails on mobile, still horizontal scroll */
    .hospitable-gallery-thumb {
        flex: 0 0 90px !important;
        width: 90px !important;
        height: 90px !important;
    }

    .hospitable-gallery-prev,
    .hospitable-gallery-next {
        width: 36px;
        height: 36px;
    }

    .hospitable-gallery-prev {
        left: 8px;
    }

    .hospitable-gallery-next {
        right: 8px;
    }

    .hospitable-gallery-caption {
        font-size: 12px;
        padding: 10px 48px 10px 12px;
    }

    .hospitable-gallery-counter {
        font-size: 11px;
        padding: 10px;
        bottom: 10px;
        right: 10px;
    }
}

/* Lightbox – Responsive */
@media screen and (max-width: 768px) {
    .hospitable-lightbox-container {
        padding: 0 48px;
    }

    .hospitable-lightbox-prev {
        left: 8px;
    }

    .hospitable-lightbox-next {
        right: 8px;
    }

    .hospitable-lightbox-prev,
    .hospitable-lightbox-next {
        width: 42px;
        height: 42px;
    }

    .hospitable-lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
}

@media screen and (max-width: 480px) {
    .hospitable-lightbox-container {
        padding: 0;
    }

    .hospitable-lightbox-img {
        border-radius: 4px;
    }

    .hospitable-lightbox-caption {
        font-size: 13px;
        display: none;
    }

    .hospitable-lightbox-footer {
        padding-top: 10px;
        justify-content: center !important;
    }
}

/* ========================================
   Print Styles
======================================== */
@media print {
    .amenity-category {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .hospitable-gallery-thumbnails,
    .hospitable-gallery-prev,
    .hospitable-gallery-next,
    .hospitable-gallery-counter {
        display: none;
    }

    .hospitable-gallery-layout {
        grid-template-columns: 1fr;
    }

    .hospitable-gallery-main {
        height: auto;
        border-radius: 0;
    }

    .hospitable-gallery-track {
        transition: none;
    }

    .hospitable-lightbox {
        display: none !important;
    }
}

/* ========================================
   Accessibility / Motion
======================================== */
@media (prefers-reduced-motion: reduce) {
    .amenity-category {
        transition: none;
    }

    .hospitable-gallery-track {
        transition: none;
    }

    .hospitable-gallery-thumb,
    .hospitable-gallery-prev,
    .hospitable-gallery-next {
        transition: none;
    }

    .hospitable-gallery-thumb:hover,
    .hospitable-gallery-prev:hover,
    .hospitable-gallery-next:hover {
        transform: none;
    }

    .hospitable-gallery-prev:hover,
    .hospitable-gallery-next:hover {
        transform: translateY(-50%);
    }

    .hospitable-lightbox {
        transition: none;
    }

    .hospitable-lightbox-img {
        transition: none;
    }

    .hospitable-lightbox-close,
    .hospitable-lightbox-prev,
    .hospitable-lightbox-next {
        transition: none;
    }

    .hospitable-lightbox-prev:hover,
    .hospitable-lightbox-next:hover {
        transform: translateY(-50%);
    }

    .hospitable-lightbox-close:hover {
        transform: none;
    }
}