/*--------------------------------------------------------------
 * Cloudbeds Individual Room Widgets – Shared Styles
 *
 * Prefix: cb-w-  (to avoid clashing with the monolithic widget)
 * Design tokens match room-details-widget.css:
 *   Headings: Playfair Display 700
 *   Body:     Lato 400 / 700
 *   Accent:   #4A7C59
 *--------------------------------------------------------------*/

/* ── Section headings ────────────────────────────── */
.cb-w-section-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: #2D2D2D;
    margin: 0 0 .75em;
    padding-bottom: .5em;
    border-bottom: 2px solid #4A7C59;
}

/* ── Room Title ──────────────────────────────────── */
.cb-w-room-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin: 0;
}

/* ── Room Description ────────────────────────────── */
.cb-w-room-description {
    font-family: 'Lato', sans-serif;
    line-height: 1.7;
    font-size: .95rem;
}

/* ── Room Banner ─────────────────────────────────── */
.cb-w-banner {
    position: relative;
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-w-banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-w-banner-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 2.2rem;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    margin: 0;
    z-index: 1;
    position: relative;
}

/* ── Room Gallery ────────────────────────────────── */
.cb-w-gallery {
    display: grid;
    gap: 10px;
}

.cb-w-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cb-w-gallery-item img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ── Lightbox ────────────────────────────────────── */
.cb-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cb-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
}

.cb-lightbox-close {
    position: absolute;
    top: 12px;
    right: 18px;
    z-index: 10;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 10px;
    transition: opacity 0.2s;
}

.cb-lightbox-close:hover {
    opacity: 0.7;
}

.cb-lightbox-prev,
.cb-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.45);
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 14px 16px;
    line-height: 1;
    border-radius: 4px;
    transition: background 0.2s;
}

.cb-lightbox-prev:hover,
.cb-lightbox-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.cb-lightbox-prev {
    left: 16px;
}

.cb-lightbox-next {
    right: 16px;
}

.cb-lightbox-main {
    position: relative;
    z-index: 5;
    max-width: 70vw;
    max-height: 68vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-lightbox-img {
    max-width: 100%;
    max-height: 68vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.cb-lightbox-thumbs {
    position: relative;
    z-index: 5;
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding: 6px 12px;
    overflow-x: auto;
    max-width: 80vw;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.cb-lightbox-thumbs::-webkit-scrollbar {
    height: 4px;
}

.cb-lightbox-thumbs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.cb-lightbox-thumb {
    width: 72px;
    height: 52px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    border: 2px solid transparent;
    transition: opacity 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

.cb-lightbox-thumb:hover {
    opacity: 0.8;
}

.cb-lightbox-thumb.active {
    opacity: 1;
    border-color: #fff;
}

/* ── Room Price ──────────────────────────────────── */
.cb-w-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.cb-w-price-prefix {
    font-family: 'Lato', sans-serif;
    font-size: .85rem;
    font-style: italic;
    color: #888;
}

.cb-w-price-amount {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: #4A7C59;
}

.cb-w-price-period {
    font-family: 'Lato', sans-serif;
    font-size: .85rem;
    color: #888;
}

/* ── Room Occupancy ──────────────────────────────── */
.cb-w-occupancy ul,
.cb-w-occupancy-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cb-w-occupancy li {
    font-family: 'Lato', sans-serif;
    font-size: .95rem;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #eee;
}

.cb-w-occupancy li:last-child {
    border-bottom: none;
}

.cb-w-occupancy li i {
    color: #4A7C59;
    width: 20px;
    text-align: center;
}

/* Horizontal layout: items flow left-to-right */
.cb-w-occupancy--horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.cb-w-occupancy--horizontal li {
    border-bottom: none;
    padding: 4px 0;
}

/* Inline items: compact, separated by a divider */
.cb-w-occupancy--inline {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 0;
}

.cb-w-occupancy--inline li {
    border-bottom: none;
    padding: 4px 12px 4px 0;
    border-right: 1px solid #ddd;
    margin-right: 0;
}

.cb-w-occupancy--inline li:last-child {
    border-right: none;
    padding-right: 0;
}

/* ── Room Amenities ──────────────────────────────── */
.cb-w-amenities-list {
    display: grid;
    gap: 8px 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cb-w-amenities-list li {
    font-family: 'Lato', sans-serif;
    font-size: .92rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cb-w-amenities-list li i {
    color: #4A7C59;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* Horizontal layout: single row, wrapping */
.cb-w-amenities--horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

/* ── Room Deposit ────────────────────────────────── */
.cb-w-deposit p {
    font-family: 'Lato', sans-serif;
    font-size: .95rem;
    margin: 0;
}

/* ── Cancellation / Terms shared ──────────────────── */
.cb-w-policy-content {
    font-family: 'Lato', sans-serif;
    font-size: .93rem;
    line-height: 1.7;
}

/* ── Check-in / Check-out ────────────────────────── */
.cb-w-checkin-checkout ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cb-w-checkin-checkout li {
    font-family: 'Lato', sans-serif;
    font-size: .95rem;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cb-w-checkin-checkout li i {
    color: #4A7C59;
    width: 20px;
    text-align: center;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    .cb-w-banner-title {
        font-size: 1.5rem;
    }

    .cb-w-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .cb-w-amenities-list {
        grid-template-columns: 1fr !important;
    }

    .cb-room-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── Room Grid ───────────────────────────────────── */
.cb-room-grid-wrapper {
    width: 100%;
}

.cb-room-grid-heading {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 400;
    margin: 0 0 28px;
    text-align: center;
}

.cb-room-grid {
    display: grid;
    gap: 28px;
}

.cb-room-grid-card {
    background: #f5f5f0;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.25s ease;
}

.cb-room-grid-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.cb-room-grid-img-link {
    display: block;
    overflow: hidden;
}

.cb-room-grid-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.cb-room-grid-card:hover .cb-room-grid-img {
    transform: scale(1.04);
}

.cb-room-grid-body {
    padding: 18px 20px 22px;
}

.cb-room-grid-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 10px;
    font-style: italic;
}

.cb-room-grid-title a {
    color: #2D2D2D;
    text-decoration: none;
    transition: color 0.2s;
}

.cb-room-grid-title a:hover {
    color: #4A7C59;
}

.cb-room-grid-desc {
    font-family: 'Lato', sans-serif;
    font-size: .92rem;
    line-height: 1.65;
    color: #666;
    margin: 0 0 8px;
}

.cb-room-grid-price {
    font-family: 'Lato', sans-serif;
    font-size: .88rem;
    font-weight: 600;
    color: #4A7C59;
    margin: 8px 0 0;
}