
/* End-user facility listing cards */
.regular-user-theme .facility-top-row {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.regular-user-theme .search-bar {
    width: 100%;
    max-width: 360px;
}

.regular-user-theme .search-bar input {
    width: 100%;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(13, 155, 0, 0.35);
    background: #ffffff;
    color: #3f4639;
    font-size: 12px;
    outline: none;
    padding: 0 15px;
}

.regular-user-theme .search-bar select {
    width: 100%;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(13, 155, 0, 0.35);
    background: #ffffff;
    color: #3f4639;
    font-size: 12px;
    outline: none;
    padding: 0 15px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #666 50%), linear-gradient(135deg, #666 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.regular-user-theme .facilities-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 5fr));
    gap: 10px;
    padding-bottom: 40px;
    padding-left: 30px;
}

.regular-user-theme .facility-card-wrapper {
    position: relative;
    min-width: 0;
}

.regular-user-theme .facility-card-wrapper .facility-feature-card,
.regular-user-theme .facility-feature-card {
    position: relative;
    display: block;
    width: 90%;
    min-height: 320px;
    overflow: hidden;
    border: 0;
    border-radius: 24px;
    background: #273019;
    box-shadow: 0 18px 34px rgba(20, 28, 16, 0.2);
    cursor: pointer;
    isolation: isolate;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.regular-user-theme .facility-card-wrapper .facility-feature-card::after,
.regular-user-theme .facility-feature-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(16, 25, 13, 0) 26%,
        rgba(42, 47, 22, 0.72) 62%,
        rgba(31, 38, 21, 0.98) 100%
    );
    pointer-events: none;
}

.regular-user-theme .facility-card-wrapper .facility-image-holder,
.regular-user-theme .facility-feature-card .facility-image-holder,
.regular-user-theme .facility-feature-card > .facility-image-holder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
    background: #d5d8cd;
}

.regular-user-theme .facility-card-wrapper .facility-image-holder img,
.regular-user-theme .facility-card-wrapper .placeholder-image,
.regular-user-theme .facility-feature-card .facility-image-holder img,
.regular-user-theme .facility-feature-card .placeholder-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.regular-user-theme .facility-card-wrapper .placeholder-image,
.regular-user-theme .facility-feature-card .placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    background: linear-gradient(135deg, #31542b, #1f2816);
    color: #ffffff;
    font-size: 56px;
    font-weight: 800;
}

.regular-user-theme .facility-card-wrapper .facility-details,
.regular-user-theme .facility-feature-card .facility-details {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 0 20px 24px;
}

.regular-user-theme .facility-card-wrapper .facility-details h3,
.regular-user-theme .facility-feature-card .facility-details h3 {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: 0;
    text-shadow: 0 1px 18px rgba(0, 0, 0, 0.32);
}

.regular-user-theme .facility-card-wrapper .facility-meta-row,
.regular-user-theme .facility-feature-card .facility-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.regular-user-theme .facility-card-wrapper .facility-pill,
.regular-user-theme .facility-feature-card .facility-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    backdrop-filter: blur(8px);
}

.regular-user-theme .facility-card-wrapper .capacity,
.regular-user-theme .facility-feature-card .capacity {
    display: none;
}

.regular-user-theme .facility-card-wrapper .description,
.regular-user-theme .facility-feature-card .description {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    line-height: 1.28;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.regular-user-theme .facility-card-wrapper .btn-view,
.regular-user-theme .facility-feature-card .btn-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 36px;
    margin-top: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #ffffff;
    color: #22251b;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.22);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.regular-user-theme .facility-card-wrapper .btn-view:hover,
.regular-user-theme .facility-feature-card .btn-view:hover {
    background: #f5f5f0;
    color: #0f1a0e;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    transform: translateY(-1px);
}

.regular-user-theme .no-facilities {
    text-align: center;
    padding: 60px 20px;
    background: rgba(13, 155, 0, 0.05);
    border-radius: 12px;
    color: #999;
}

.regular-user-theme .hover-card,
.regular-user-theme .facility-card-wrapper:hover .hover-card {
    display: none !important;
}

.regular-user-theme .btn-hover-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    background: var(--feu-green);
    color: white;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.facility-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 24, 28, 0.38);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 24px;
    overflow: auto;
}

.facility-preview-overlay.open {
    display: flex;
}

.facility-preview-body {
    max-width: 1100px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    position: relative;
}

.facility-preview-body .facility-popup-card {
    border-radius: 18px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.14);
    position: relative;
}

.facility-preview-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2100;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    background: #ffffff;
    color: var(--feu-ink);
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.facility-preview-body .facility-view-content {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 28px;
    align-items: start;
}

.facility-preview-body .image-gallery-section {
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
}

.facility-preview-body .main-image {
    height: 300px;
    background: transparent;
    overflow: hidden;
}

.facility-preview-body .main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.facility-preview-body .thumbnail-strip {
    display: flex;
    gap: 10px;
    padding-top: 12px;
    background: transparent;
    overflow-x: auto;
}

.facility-preview-body .thumbnail {
    width: 72px;
    height: 54px;
    border: 3px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
}

.facility-preview-body .thumbnail.active {
    border-color: var(--feu-green);
}

.facility-preview-body .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.facility-preview-body .details-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.facility-preview-body .facility-header,
.facility-preview-body .info-card,
.facility-preview-body .action-section {
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.facility-preview-body .capacity-number {
    font-size: 34px;
    font-weight: 700;
    color: var(--feu-green);
}

.facility-preview-body .action-section {
    display: flex;
    justify-content: center;
}

.facility-preview-body .btn-reserve {
    display: inline-flex;
    justify-content: center;
    width: auto;
    padding: 12px 36px;
    border-radius: 12px;
    background: var(--feu-green);
    color: white;
    font-size: 16px;
    font-weight: 700;
}

.facility-preview-body .btn-reserve:hover {
    background: var(--feu-green-dark);
    box-shadow: 0 6px 18px rgba(13, 155, 0, 0.28);
    transform: translateY(-1px);
}

@media (max-width: 1200px) {
    .regular-user-theme .facilities-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .regular-user-theme .facilities-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .facility-preview-body .facility-view-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .regular-user-theme .facility-top-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 20px;
    }

    .regular-user-theme .search-bar {
        max-width: none;
    }

    .regular-user-theme .facility-count {
        text-align: center;
    }

    .regular-user-theme .facilities-grid {
        grid-template-columns: 1fr;
    }

    .regular-user-theme .facility-card-wrapper .facility-feature-card {
        min-height: 360px;
    }

    .facility-preview-overlay {
        padding: 12px;
    }
}

/* Modal styles for facility quick view (matches facility view design) */
.facility-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 2000;
}
.facility-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(18, 24, 28, 0.38);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.facility-modal-dialog {
    position: relative;
    width: min(980px, 95%);
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
    z-index: 2;
}
.facility-modal-close {
    position: absolute;
    right: 12px;
    top: 8px;
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
}
.facility-modal .facility-view-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}
.facility-modal .facility-image-section img {
    width: 100%;
    height: auto;
    display: block;
}
.facility-modal .facility-image-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.facility-modal .modal-main-image-wrap {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f4f4f4;
}
.facility-modal .modal-main-image {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}
.facility-modal .modal-thumbnail-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.facility-modal .modal-thumbnail {
    width: 54px;
    height: 54px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    flex: 0 0 auto;
}
.facility-modal .modal-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.facility-modal .modal-thumbnail.is-active {
    border-color: var(--feu-green);
    box-shadow: 0 0 0 2px rgba(13, 155, 0, 0.12);
}
.facility-modal .placeholder-image {
    width: 100%;
    aspect-ratio: 1;
}
.facility-modal .modal-placeholder-image {
    min-height: 320px;
}

@media (max-width: 768px) {
    .facility-modal .facility-view-content {
        grid-template-columns: 1fr;
    }
    .facility-modal .modal-main-image {
        height: 240px;
    }
    .facility-modal .modal-placeholder-image {
        min-height: 240px;
    }
}

/* Reserve button inside facility modal */
.facility-modal .btn-reserve {
    background: var(--feu-green);
    color: white;
    text-decoration: none;
    display: inline-block;
    padding: 14px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
}

.facility-modal .btn-reserve:hover {
    background: var(--feu-green-dark);
    box-shadow: 0 4px 12px rgba(13,155,0,0.25);
}

/* Steam-style facility preview layout used by end-user and landing popups */

.facility-preview-body {
    max-width: 1200px;
}

.facility-preview-body .facility-popup-card,
.facility-modal .facility-modal-dialog {
    width: min(1200px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 32px));
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(97, 126, 153, 0.35);
    border-radius: 4px;
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.48);
}

.facility-preview-body .facility-view-content,
.facility-modal .facility-view-content {
    display: grid;
    grid-template-columns: minmax(0, 2.08fr) minmax(310px, 1fr);
    gap: 0;
    align-items: stretch;
    min-height: 540px;
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
}

.facility-preview-body .image-gallery-section,
.facility-modal .facility-image-section {
    min-width: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 4px;
    overflow: hidden;
    border-radius: 0;
    background: #07111c;
    box-shadow: none;
}

.facility-preview-body .main-gallery {
    min-width: 0;
    min-height: 0;
    display: contents;
}

.facility-preview-body .main-image,
.facility-preview-body .single-image,
.facility-preview-body .image-gallery-section > .placeholder-image,
.facility-modal .modal-main-image-wrap,
.facility-modal .modal-placeholder-image {
    width: 100%;
    height: 455px;
    min-height: 455px;
    overflow: hidden;
    border-radius: 0;
    background: #ffffff;
}

.facility-preview-body .main-image img,
.facility-preview-body .single-image img,
.facility-modal .modal-main-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.facility-preview-body .thumbnail-strip,
.facility-modal .modal-thumbnail-strip {
    display: flex;
    gap: 4px;
    min-height: 72px;
    padding: 4px 0 0;
    overflow-x: auto;
    overflow-y: hidden;
    background: #07111c;
    scrollbar-color: #28445e #0c1722;
}

.facility-preview-body .thumbnail,
.facility-modal .modal-thumbnail {
    width: 116px;
    height: 66px;
    flex: 0 0 116px;
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 0;
    background: #ffffff;
    cursor: pointer;
    opacity: 0.72;
    transition: opacity 0.16s ease, border-color 0.16s ease;
}

.facility-preview-body .thumbnail:hover,
.facility-preview-body .thumbnail.active,
.facility-modal .modal-thumbnail:hover,
.facility-modal .modal-thumbnail.is-active {
    opacity: 1;
    border-color: #d6e6f5;
    box-shadow: none;
}

.facility-preview-body .thumbnail img,
.facility-modal .modal-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.facility-preview-body .details-section,
.facility-modal .facility-info-section {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 16px 18px;
    background: linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
    color: #ffffff;
    overflow-y: auto;
}

.facility-preview-side-media {
    width: calc(100% + 32px);
    height: 174px;
    margin: 0 -16px 0;
    overflow: hidden;
    background: #ffffff;
}

.facility-preview-side-media img,
.facility-preview-side-media .placeholder-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.facility-preview-side-media .placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff, #ffffff);
    color: #05920c;
    font-size: 48px;
    font-weight: 800;
}

.facility-preview-body .facility-header,
.facility-preview-body .info-card,
.facility-modal .info-box {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.facility-preview-body .facility-title,
.facility-modal #modalFacilityName {
    margin: 0;
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: 0;
}

.facility-preview-body .facility-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.facility-preview-body .meta-item {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 6px 9px;
    border-radius: 2px;
    background: rgb(255, 254, 254);
    color: #000000;
    font-size: 12px;
    line-height: 1;
}


.facility-preview-body .description-text,
.facility-modal #modalDescription {
    margin: 0;
    color: #c7d5e0;
    font-size: 14px;
    line-height: 1.45;
}

.facility-facts {
    display: grid;
    gap: 8px;
    margin-top: 4px;
}

.facility-fact-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    align-items: center;
    color: #6f8598;
    font-size: 12px;
    text-transform: uppercase;
}

.facility-fact-row strong {
    color: #05920c;
    font-size: 13px;
    font-weight: 700;
    text-transform: none;
}

.facility-preview-body .action-section,
.facility-modal .user-actions {
    margin-top: auto;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.facility-preview-body .btn-reserve,
.facility-modal .btn-reserve {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    padding: 12px 18px;
    border-radius: 2px;
    background: linear-gradient(90deg, #75b022 0%, #588a1b 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: none;
}

.facility-preview-body .btn-reserve:hover,
.facility-modal .btn-reserve:hover {
    background: linear-gradient(90deg, #8cc83a 0%, #67a124 100%);
    box-shadow: none;
    transform: none;
}

.facility-preview-close,
.facility-modal-close {
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(199, 213, 224, 0.24);
    border-radius: 2px;
    background: rgba(5, 13, 22, 0.62);
    color: #c7d5e0;
    line-height: 1;
}

.facility-preview-close:hover,
.facility-modal-close:hover {
    background: rgba(102, 192, 244, 0.22);
    color: #ffffff;
}

@media (max-width: 980px) {
    .facility-preview-body .facility-view-content,
    .facility-modal .facility-view-content {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .facility-preview-body .main-image,
    .facility-preview-body .single-image,
    .facility-preview-body .image-gallery-section > .placeholder-image,
    .facility-modal .modal-main-image-wrap,
    .facility-modal .modal-placeholder-image {
        height: 320px;
        min-height: 320px;
    }

    .facility-preview-body .details-section,
    .facility-modal .facility-info-section {
        max-height: none;
    }
}

@media (max-width: 620px) {
    .facility-preview-body .facility-popup-card,
    .facility-modal .facility-modal-dialog {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
    }

    .facility-preview-body .main-image,
    .facility-preview-body .single-image,
    .facility-preview-body .image-gallery-section > .placeholder-image,
    .facility-modal .modal-main-image-wrap,
    .facility-modal .modal-placeholder-image {
        height: 235px;
        min-height: 235px;
    }

    .facility-preview-body .thumbnail,
    .facility-modal .modal-thumbnail {
        width: 86px;
        height: 54px;
        flex-basis: 86px;
    }

    .facility-preview-side-media {
        height: 132px;
    }

    .facility-fact-row {
        grid-template-columns: 88px 1fr;
    }
}

/* Final facility detail modal overlay: full-page dim/blur with centered card */
.facility-preview-overlay,
.facility-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    background: rgba(18, 24, 28, 0.38) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

.facility-preview-overlay.open {
    display: flex !important;
}

.facility-modal[style*="grid"] {
    display: grid !important;
}

.facility-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(255, 255, 255, 0.34) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
}

.facility-preview-body,
.facility-modal-dialog {
    position: relative !important;
    z-index: 1 !important;
    margin: 0 auto !important;
    transform: none !important;
}

@media (max-width: 720px) {
    .facility-preview-overlay,
    .facility-modal {
        padding: 14px !important;
    }
}
