/* v30.0 */

.hsi-rooms-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.hsi-room-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-font-smoothing: antialiased;
}
.hsi-room-card:hover {
    box-shadow: 0 20px 60px rgba(0,0,0,0.10);
    transform: translateY(-6px);
}

.hsi-room-card__image-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    flex-shrink: 0;
    overflow: hidden;
}
.hsi-room-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.hsi-room-card:hover .hsi-room-card__image {
    transform: scale(1.08);
}
.hsi-room-card__image-wrap--placeholder {
    background: linear-gradient(135deg, #f5f7fa, #e8ecf1);
    height: 100%;
    min-height: 260px;
}

.hsi-room-card__price-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05em;
    line-height: 1.3;
    z-index: 2;
    letter-spacing: 0.3px;
}

.hsi-room-card__body {
    flex: 1;
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
}

.hsi-room-card__title {
    font-weight: 600;
    margin: 0 0 12px;
    font-size: 1.25em;
    color: var(--hsi-s, #1a1a1a);
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.hsi-room-card__desc {
    color: #666;
    line-height: 1.7;
    margin: 0 0 16px;
    font-size: 0.92em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hsi-room-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-bottom: 14px;
    color: #666;
    font-size: 0.9em;
}
.hsi-room-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hsi-room-card__meta i {
    color: var(--hsi-p, #007cba);
    width: 1em;
    text-align: center;
    font-size: 0.95em;
}

.hsi-room-card__amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-bottom: auto;
    padding-bottom: 16px;
}
.hsi-room-card__amenities span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px 5px 7px;
    color: #555;
    background: #f5f6f8;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 0.82em;
    font-weight: 500;
}
.hsi-room-card__amenities i {
    color: var(--hsi-p, #007cba);
    width: 1em;
    text-align: center;
    font-size: 0.9em;
}

.hsi-room-card__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
    margin-top: auto;
}

.hsi-room-card__actions {
    display: flex;
    gap: 10px;
    width: 100%;
}
.hsi-room-card__actions .hsi-btn {
    flex: 1;
    padding: 12px 16px;
    font-size: 0.88em;
    border-radius: 8px;
}



.hsi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.4;
    white-space: nowrap;
    font-size: 0.9em;
}
.hsi-btn-outline {
    border: 1.5px solid var(--hsi-s, #1a1a1a);
    color: var(--hsi-s, #1a1a1a);
    background: transparent;
}
.hsi-btn-outline:hover {
    background: var(--hsi-s, #1a1a1a);
    color: #fff;
}
.hsi-btn-primary {
    border: none;
    background: var(--hsi-p, #007cba);
    color: #fff;
}
.hsi-btn-primary:hover {
    background: var(--hsi-p-dark, #005a87);
    color: #fff;
}

.hsi-service-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px 6px 10px;
    color: #555;
    background: #f5f6f8;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 0.85em;
    font-weight: 500;
    transition: background 0.2s;
}
.hsi-service-tag i {
    color: inherit;
    width: 1em;
    text-align: center;
}

/* ── Room Detail – Modern Redesign ── */

.hsi-room-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* Hero gallery */
.hsi-detail-hero {
    position: relative;
    margin-bottom: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}
.hsi-detail-hero .hsi-swiper-gallery {
    margin-bottom: 0;
}
.hsi-detail-hero .hsi-gallery-main .swiper-slide img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    display: block;
}
.hsi-detail-hero__single img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    display: block;
}
.hsi-detail-hero .hsi-gallery-thumbs { display: none; }

.hsi-detail-hero__badge {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 10px 22px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1.05em;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Header below hero */
.hsi-detail-header {
    padding: 36px 0 40px;
}
.hsi-detail-header__title {
    font-size: 2em;
    font-weight: 300;
    color: var(--hsi-s, #1a1a1a);
    margin: 0 0 12px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}
.hsi-detail-header__desc {
    color: #555;
    line-height: 1.8;
    font-size: 0.95em;
    margin: 0;
    max-width: 720px;
}

/* Two-column layout */
.hsi-detail-grid {
    display: flex;
    gap: 56px;
    align-items: flex-start;
}
.hsi-detail-content {
    flex: 1;
    min-width: 0;
}
.hsi-detail-sidebar {
    width: 360px;
    flex-shrink: 0;
}

/* Content sections */
.hsi-detail-section {
    margin-bottom: 40px;
}
.hsi-detail-section__title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--hsi-s, #1a1a1a);
    margin: 0 0 16px;
    letter-spacing: -0.2px;
}

/* Features grid */
.hsi-detail-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.hsi-detail-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 8px;
    color: #555;
    font-size: 0.92em;
}
.hsi-detail-feature i {
    color: var(--hsi-p, #007cba);
    width: 1.2em;
    text-align: center;
}

/* Amenity tags */
.hsi-detail-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.hsi-detail-amenities .hsi-service-tag {
    padding: 8px 16px 8px 12px;
    font-size: 0.88em;
}

/* Sidebar booker */
.hsi-detail-booker {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.hsi-detail-booker__price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}
.hsi-detail-booker__price {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--hsi-s, #1a1a1a);
}
.hsi-detail-booker__currency {
    font-size: 0.95em;
    color: #888;
    font-weight: 500;
}
/* Availability result */
.hsi-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}
.hsi-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    cursor: pointer;
}
.hsi-modal-container {
    position: relative;
    width: 92%;
    max-width: 1000px;
    height: 85vh;
    margin: 5vh auto 0;
    background: #fff;
    z-index: 10;
    display: flex;
    flex-direction: column;
    animation: hsiModalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    overflow: hidden;
}
@keyframes hsiModalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.hsi-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 400;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
}
.hsi-modal-close:hover {
    background: rgba(0,0,0,0.8);
}
.hsi-modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
}
@media (max-width: 768px) {
    .hsi-modal-container {
        width: 100%;
        height: 100vh;
        margin: 0;
        max-width: none;
        border-radius: 0;
    }
    .hsi-modal-close {
        top: 12px;
        right: 12px;
    }
}

.hsi-search-wrap { max-width: 1000px; margin: 0 auto; }
.hsi-search-wrap--with-rooms .hsi-results-container { display: block; }

/* ── Search form (matches room-check design) ── */
.hsi-search-form {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.05);
}
.hsi-search-form__title {
    font-size: 1em;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--hsi-s, #1a1a1a);
}
.hsi-search-fields {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 12px;
}
.hsi-search-field {
    flex: 1;
    min-width: 0;
}
.hsi-search-field--dates {
    flex: 2;
}
.hsi-search-field--btn {
    flex: 0 0 auto;
}
.hsi-search-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 6px;
}
.hsi-search-field .hsi-flatpickr-input,
.hsi-search-field .hsi-select-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    font-size: 0.92rem;
    color: #333;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
}
.hsi-search-field .hsi-flatpickr-input:focus,
.hsi-search-field .hsi-select-input:focus {
    outline: none;
    border-color: var(--hsi-p, #007cba);
    box-shadow: 0 0 0 3px rgba(var(--hsi-prgb, 0,124,186),0.1);
}
.hsi-search-field .hsi-flatpickr-input::placeholder { color: #bbb; font-weight: 400; }

.hsi-search-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: var(--hsi-p, #007cba);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 4px;
    white-space: nowrap;
}
.hsi-search-btn:hover {
    background: var(--hsi-p-dark, #005a87);
}

.hsi-results-container { display: none; margin-top: 32px; animation: hsiFadeIn 0.4s ease; }
.hsi-results-header { display: flex; align-items: center; margin-bottom: 16px; }
.hsi-back-btn {
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    padding: 8px 18px;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}
.hsi-back-btn:hover { border-color: var(--hsi-p, #007cba); color: var(--hsi-p, #007cba); background: rgba(var(--hsi-prgb, 0,124,186),0.06); }

.hsi-results-loader {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3.75rem 1.25rem;
    text-align: center;
    color: #888;
    font-size: 0.95rem;
}
.hsi-results-loader.hsi-loader-visible { display: flex; }
.hsi-loader {
    width: 44px; height: 44px;
    border: 3px solid #e8e8e8;
    border-top-color: var(--hsi-p, #007cba);
    border-radius: 50%;
    animation: hsiSpin 0.8s linear infinite;
    margin-bottom: 16px;
}

.hsi-search-results-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .hsi-search-results-grid {
        grid-template-columns: 1fr;
    }
}
.hsi-error-msg { animation: hsiFadeIn 0.3s ease; }

@keyframes hsiSpin { to { transform: rotate(360deg); } }
@keyframes hsiFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hsi-flatpickr-wrap {
    position: relative;
    overflow: visible !important;
}
.hsi-search-form,
.hsi-search-fields,
.hsi-search-field {
    overflow: visible !important;
}
.flatpickr-calendar {
    box-shadow: 0 12px 48px rgba(0,0,0,0.15) !important;
    border: 1px solid #eee !important;
    border-radius: 0 !important;
    overflow: visible !important;
    z-index: 99999 !important;
    margin-top: 4px !important;
}
.flatpickr-calendar .dayContainer {
    justify-content: flex-start !important;
    min-width: 100% !important;
    max-width: 100% !important;
}
.flatpickr-calendar .flatpickr-days {
    width: 100% !important;
}

@media (max-width: 480px) {
    .flatpickr-calendar {
        width: 100% !important;
        max-width: 290px !important;
    }
    .flatpickr-calendar .flatpickr-days {
        width: 100% !important;
    }
    .flatpickr-calendar .dayContainer {
        min-width: 100% !important;
        max-width: 100% !important;
    }
}

/* ── Room Check (detail sidebar) ── */
.hsi-room-check {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.05);
    max-width: 400px;
}
.hsi-room-check__title {
    font-size: 1em;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--hsi-s, #1a1a1a);
}
.hsi-room-check__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
}
.hsi-room-check__field.hsi-field-dates {
    flex: 1 1 100%;
}
.hsi-room-check__field.hsi-field-sm {
    flex: 1 1 100%;
}
.hsi-room-check__field.hsi-field-btn {
    flex: 1 1 100%;
}
.hsi-room-check__field.hsi-field-btn .hsi-room-check__btn {
    width: 100%;
}
.hsi-room-check__field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 6px;
}
.hsi-room-check__field .hsi-flatpickr-input,
.hsi-room-check__field .hsi-select-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    font-size: 0.92rem;
    color: #333;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
}
.hsi-room-check__field .hsi-flatpickr-input:focus,
.hsi-room-check__field .hsi-select-input:focus {
    outline: none;
    border-color: var(--hsi-p, #007cba);
    box-shadow: 0 0 0 3px rgba(var(--hsi-prgb, 0,124,186),0.1);
}
.hsi-room-check__btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: var(--hsi-p, #007cba);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 4px;
}
.hsi-room-check__btn:hover {
    background: var(--hsi-p-dark, #005a87);
}
.hsi-room-check__result {
    margin-top: 16px;
}
.hsi-room-check__result .hsi-avail-result__box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    font-weight: 600;
    animation: hsiFadeIn 0.35s ease;
    border-radius: 8px;
}
.hsi-room-check__result .hsi-avail-result__available {
    background: #f0f8f0;
    border: 1.5px solid #46b450;
    color: #2e7d32;
}
.hsi-room-check__result .hsi-avail-result__unavailable {
    background: #fef0f0;
    border: 1.5px solid #dc3232;
    color: #b71c1c;
}
.hsi-room-check__result .hsi-avail-result__icon {
    font-size: 1.2em;
    font-weight: 800;
    line-height: 1;
}
.hsi-room-check__result .hsi-avail-result__label {
    flex: 1;
    font-size: 0.92em;
}
.hsi-room-check__result .hsi-avail-result__price {
    font-weight: 800;
    white-space: nowrap;
}

.hsi-detail-booker .hsi-room-check {
    max-width: 100%;
}

.hsi-detail-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: color 0.2s;
}
.hsi-detail-back-link:hover {
    color: var(--hsi-p, #007cba);
}

/* ── Responsive ── */

@media (min-width: 769px) {
    .hsi-room-card {
        flex-direction: row;
        align-items: stretch;
    }
    .hsi-room-card__image-wrap {
        width: 320px;
        height: auto;
        min-height: 260px;
        flex-shrink: 0;
    }
    .hsi-room-card__body {
        padding: 28px;
    }
    .hsi-search-field--btn {
        flex: 0 0 auto;
    }
    .hsi-search-btn {
        width: auto;
        padding: 12px 24px;
    }
}

@media (max-width: 768px) {
    /* ── Search form: wrapped (matches room-check) ── */
    .hsi-search-fields {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        align-items: stretch;
    }
    .hsi-search-field--dates {
        flex: 1 1 100%;
    }
    .hsi-search-field--sm {
        flex: 1 1 calc(33.33% - 8px);
        min-width: 0;
    }
    .hsi-search-field--btn {
        flex: 1 1 100%;
    }
    .hsi-search-btn {
        width: 100%;
    }
    .hsi-search-form { padding: 20px; }

    /* ── Room check: 3 selects in a row ── */
    .hsi-room-check__field.hsi-field-sm {
        flex: 1 1 calc(33.33% - 6px);
        min-width: 0;
    }

    /* ── Room detail ── */
    .hsi-detail-hero .hsi-gallery-main .swiper-slide img,
    .hsi-detail-hero__single img { height: 320px; }
    .hsi-detail-header { padding: 28px 0 32px; }
    .hsi-detail-header__title { font-size: 1.5em; }
    .hsi-detail-grid { flex-direction: column; gap: 32px; }
    .hsi-detail-sidebar { width: 100%; }
    .hsi-detail-booker { position: static; }
}

@media (max-width: 600px) {
    .hsi-search-form { padding: 16px; }
    .hsi-room-card__image-wrap { height: 200px; }
    .hsi-room-card__body { padding: 18px 18px 18px; }
    .hsi-room-card__title { font-size: 1.1em; }

    .hsi-detail-hero .hsi-gallery-main .swiper-slide img,
    .hsi-detail-hero__single img { height: 240px; }
    .hsi-detail-hero__badge { top: 14px; right: 14px; padding: 8px 16px; font-size: 0.9em; }
    .hsi-detail-header { padding: 20px 0 24px; }
    .hsi-detail-header__title { font-size: 1.3em; }
    .hsi-detail-header__desc { font-size: 0.9em; }
    .hsi-detail-section__title { font-size: 1em; }
    .hsi-detail-features { grid-template-columns: 1fr 1fr; }
    .hsi-detail-booker__price { font-size: 1.3em; }
}

@media (max-width: 480px) {
    .hsi-search-form { padding: 14px; }
    .hsi-detail-features { grid-template-columns: 1fr; }
}
