/* HotelConnect base styles - portable across themes */
:root {
    --hc-primary: var(--primary-color, #2563eb);
    --hc-accent: var(--primary-color-2, var(--primary-color, #1e40af));
    --hc-danger: #dc2626;
    --hc-warning: #d97706;
    --hc-muted: #6b7280;
    --hc-border: #e5e7eb;
}

/* HC room card wrapper - inherits theme .hotel-room layout */
.hc-mustgo-room {
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════════════
   Cột giá của thẻ phòng
   ───────────────────────────────────────────────────────────────────────
   Theme để `.room-price-utilities` là flex cột `align-items:end` (5/7 theme) hoặc
   block (VNE, Euphoria) ⇒ cùng một khối giá ra hai kiểu canh lề. Bám vào ô của
   module (`.hc-price-slot`) để mọi theme ra một bố cục: phần tử trải hết bề ngang
   cột, chữ canh phải (giá là số — canh phải mới so được bằng mắt).
   ═══════════════════════════════════════════════════════════════════════ */
.hc-price-slot .room-price-utilities:not(.hc-contact-block) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    text-align: right;
}
.hc-price-slot .room-price-utilities .book-hotel-room {
    width: 100%;
}

/* Theme chừa 30px + 10px bên trái cột giá cho đường kẻ dọc — ở cột col-md-2 thì chỉ
   còn ~110px cho nội dung, giá 22px tràn qua đường kẻ. Nới lại cho thẻ phòng của module. */
@media (min-width: 768px) {
    .hotel-room.hc-mustgo-room .room-list-utilities {
        padding-left: 16px;
        margin-left: 0;
    }
}

/* Dãy sao + điểm đánh giá ở cột thông tin: cột hẹp thì cho điểm xuống dòng, đừng bẻ đôi
   dãy sao thành "★★ / ★★ / ★" (theme để flex một hàng, không wrap, sao không nowrap). */
.hotel-room.hc-mustgo-room .room-info .room-meta {
    flex-wrap: wrap;
    gap: 6px 10px;
}
.hotel-room.hc-mustgo-room .room-info .room-star .star {
    display: inline-flex;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* Chọn gói — thẻ chọn (radio) thay cho <select> */
/* Canh lề tiêu đề KẾ THỪA từ khối giá: desktop canh phải (rule đầu mục này), điện thoại thì
   custom.css của Vietago ép cả khối canh giữa bằng !important — thuận theo theme, đừng đấu.
   Chỉ ruột từng thẻ gói là canh trái cố định (tên gói trái, giá phải). */
.hc-rate-options {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    gap: 6px;
    margin-top: 4px;
}
.hc-rate-options__title {
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: .2px;
    text-transform: uppercase;
    color: var(--hc-muted);
}
.hc-rate-option {
    position: relative;
    text-align: left;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    min-height: 44px;
    margin: 0;
    padding: 8px 10px 8px 30px;
    border: 1px solid var(--hc-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-weight: 400;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
/* Vòng tròn radio tự vẽ — ô radio thật được ẩn (vẫn bấm được bằng bàn phím) */
.hc-rate-option::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 10px;
    width: 14px;
    height: 14px;
    border: 1.5px solid #9ca3af;
    border-radius: 50%;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}
.hc-rate-option:hover {
    border-color: var(--hc-primary);
}
.hc-rate-option.is-selected {
    border-color: var(--hc-primary);
    background: #f8fafc;
    background: color-mix(in srgb, var(--hc-primary) 7%, #fff);
    box-shadow: inset 0 0 0 1px var(--hc-primary);
}
.hc-rate-option.is-selected::before {
    border-color: var(--hc-primary);
    box-shadow: inset 0 0 0 3px #fff;
    background: var(--hc-primary);
}
.hc-rate-option:focus-within {
    outline: 2px solid var(--hc-primary);
    outline-offset: 2px;
}
.hc-rate-option.is-disabled {
    cursor: not-allowed;
    opacity: .55;
}
.hc-rate-option.is-disabled:hover {
    border-color: var(--hc-border);
}
.hc-rate-option__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 96px;
    min-width: 0;
}
.hc-rate-option__board {
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    color: #1f2937;
}
.hc-rate-option__cancel,
.hc-rate-option__soldout {
    font-size: 12px;
    line-height: 16px;
    color: var(--hc-muted);
}
.hc-rate-option__cancel.is-free {
    color: #15803d;
}
.hc-rate-option__soldout {
    color: var(--hc-danger);
}
.hc-rate-option__price {
    margin-left: auto;
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;
    white-space: nowrap;
    color: #1f2937;
}
.hc-rate-option.is-selected .hc-rate-option__price {
    color: var(--hc-accent);
}

/* Price display */
.hc-price-display {
    color: var(--hc-accent);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}
/* Euphoria canh giữa `.price-utilities-regular` bằng rule 0-3-0 ⇒ giá đứng lệch khỏi trục
   của cả cột. Ép về cùng trục (0-4-0); ở điện thoại custom.css của Vietago dùng !important
   để canh giữa và vẫn thắng — đúng ý theme. */
.hotel-room .hc-price-slot .room-price-utilities .price-utilities-regular,
.hotel-room .hc-price-slot .room-price-utilities .price-regular {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.hc-price-original {
    font-size: 13px;
    line-height: 18px;
    color: #9ca3af;
}
.hc-price-original[hidden] {
    display: none;
}
.hc-price-nights {
    font-size: 12px;
    line-height: 16px;
    color: var(--hc-muted);
}

/* Allotment indicator — theme tô chữ dòng này bằng gradient đỏ cắt theo chữ
   (`-webkit-text-fill-color: transparent`), nên "Còn phòng" cũng ra màu đỏ như một
   lời cảnh báo. Trả về màu thật: còn nhiều = xanh, sắp hết = đỏ. */
.room-price-utilities .hc-allotment-display {
    margin: 0;
    font-size: 12px;
    line-height: 16px;
    background: none;
    -webkit-text-fill-color: currentColor;
    color: #15803d;
}
.room-price-utilities .hc-allotment-display:empty {
    display: none;
}
.hc-allotment-low {
    color: var(--hc-danger);
    font-weight: 600;
}

/* Book button - theme-aware primary color */
.hc-mustgo-book {
    display: inline-block;
    padding: 8px 16px;
    background: var(--hc-primary);
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    text-align: center;
    width: 100%;
}
.hc-mustgo-book:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}
.hc-mustgo-book:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.hc-mustgo-book .fa-spinner {
    margin-left: 6px;
}

/* Capacity icons */
.hc-mustgo-room .capacity-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 8px;
    color: var(--hc-muted);
    font-size: 13px;
}
.hc-mustgo-room .capacity-icon {
    width: 18px;
    height: 18px;
}
.hc-mustgo-room .capacity-item--child .capacity-icon {
    width: 16px;
    height: 16px;
}

/* Nhãn "Ảnh khách sạn" — chỉ hiện khi phòng đang MƯỢN ảnh của khách sạn và admin đã bật
   công tắc hotel_room_image_fallback_label. Đặt trong .slide-item nên slot phải relative. */
.hc-mustgo-room .slide-item {
    position: relative;
}
.hc-mustgo-room .hc-borrowed-badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 2;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(17, 24, 39, .72);
    color: #fff;
    font-size: 11px;
    line-height: 1.6;
    font-weight: 500;
    pointer-events: none;
}

/* Placeholder image (khi room không có ảnh — thay bằng logo site) */
.hc-mustgo-room .slide-item.is-placeholder-slot {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hc-mustgo-room .slide-item.is-placeholder-slot img.is-placeholder {
    width: 60% !important;
    height: 60% !important;
    max-width: 200px;
    max-height: 120px;
    object-fit: contain !important;
    opacity: 0.55;
    filter: grayscale(0.2);
}

/* Contact block (room without rate — fallback to enquiry button) */
.hc-contact-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
}
.hc-contact-label {
    font-size: 14px;
    color: var(--hc-muted);
}
.hc-contact-label ins {
    text-decoration: none;
    color: #e74c3c;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}
.hc-contact-action {
    width: 100%;
}
.hc-enquiry-btn {
    display: inline-block;
    width: 100%;
    padding: 8px 14px;
    background: var(--hc-primary);
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.2s, transform 0.1s;
}
.hc-enquiry-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.hc-contact-note {
    margin-top: 6px;
    font-size: 12px;
    color: var(--hc-muted);
    line-height: 1.3;
}
.hc-contact-note i {
    color: #94a3b8;
    margin-right: 2px;
}

/* Loading spinner container */
.hc-loading-container {
    text-align: center;
    padding: 40px 20px;
}
.hc-loading-container .fa-spinner {
    font-size: 32px;
    color: var(--hc-primary);
}
.hc-loading-container p {
    margin-top: 12px;
    color: var(--hc-muted);
    font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════════════════
   Khối trạng thái rỗng / lỗi
   ───────────────────────────────────────────────────────────────────────
   ⚠️ Nút bên trong mang class `.button_style` của theme, mà theme để nó
   `display:block; width:100%` → nút kéo dài hết chiều ngang khối, trông như
   một thanh chứ không như một nút. Phải ép lại chiều rộng tự nhiên ở đây,
   với specificity đủ cao để thắng rule của theme (xem `.hc-empty-actions`).

   ⚠️ Bản cũ tô MỌI chữ trong khối bằng màu cảnh báo (cam/đỏ) nên câu phụ
   nằm trên nền kem gần như không đọc được. Nay chỉ biểu tượng giữ màu,
   chữ dùng tông mực bình thường.
   ═══════════════════════════════════════════════════════════════════════ */
.hc-alert {
    margin: 20px 0;
    padding: 24px 20px;
    border-radius: 10px;
    text-align: center;
}
.hc-alert__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin-bottom: 12px;
}
.hc-alert__icon i {
    font-size: 20px;
    line-height: 1;
}
.hc-alert__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.45;
    color: #1f2937;
}
.hc-alert__note {
    margin: 6px auto 0;
    max-width: 46ch;
    font-size: 14px;
    line-height: 1.55;
    color: var(--hc-muted);
}
.hc-alert__meta {
    margin: 10px 0 0;
    font-size: 12.5px;
    color: var(--hc-muted);
}
.hc-alert__meta i { margin-right: 4px; }

.hc-alert--danger  { background: #fef2f2; border: 1px solid #fecaca; }
.hc-alert--danger  .hc-alert__icon { background: #fee2e2; color: var(--hc-danger); }
.hc-alert--warning { background: #fffbeb; border: 1px solid #fde68a; }
.hc-alert--warning .hc-alert__icon { background: #fef3c7; color: var(--hc-warning); }

/* Hàng nút: chiều rộng tự nhiên, canh giữa, xuống dòng gọn trên điện thoại */
.hc-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}
.hc-alert .hc-empty-actions .button_style,
.hc-empty-actions .button_style {
    width: auto;
    min-width: 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    border-radius: 8px;
    white-space: nowrap;
}
/* Nút phụ: viền, không nền — để nút chính vẫn là chỗ mắt nhìn vào trước */
.hc-alert .hc-empty-actions .hc-btn-ghost,
.hc-empty-actions .hc-btn-ghost {
    background: transparent;
    border: 1px solid var(--hc-border);
    color: #374151;
    box-shadow: none;
}
.hc-alert .hc-empty-actions .hc-btn-ghost:hover,
.hc-empty-actions .hc-btn-ghost:hover {
    border-color: var(--hc-primary);
    color: var(--hc-primary);
}
@media (max-width: 480px) {
    .hc-empty-actions { flex-direction: column; }
    .hc-alert .hc-empty-actions .button_style,
    .hc-empty-actions .button_style { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Kho dựng danh sách, API điền giá — trạng thái của KHỐI GIÁ
   ═══════════════════════════════════════════════════════════════════════ */

/* Chỗ chừa cho khối giá trong lúc chờ API.
   min-height PHẢI xấp xỉ chiều cao khối giá thật, nếu không thẻ nhảy khi giá về. */
.hc-price-skeleton {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 6px 0;
}
.hc-skel {
    border-radius: 6px;
    background: linear-gradient(90deg, #eef1f5 25%, #e2e6ec 37%, #eef1f5 63%);
    background-size: 400% 100%;
    animation: hc-skel-sweep 1.3s ease-in-out infinite;
}
.hc-skel--price { width: 76%; height: 22px; }
.hc-skel--note  { width: 54%; height: 12px; }
.hc-skel--btn   { width: 88%; height: 36px; border-radius: 8px; }

@keyframes hc-skel-sweep {
    0%   { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}
@media (prefers-reduced-motion: reduce) {
    .hc-skel { animation: none; }
}

/* Đường lùi khi không có khuôn loading để dựng lại (đổi ngày lần thứ hai trở đi
   trên bản HTML cũ còn nằm trong bộ đệm trình duyệt). */
.hc-slot-busy { opacity: .45; pointer-events: none; }

/* Câu dẫn ngay trên nút "Gửi yêu cầu" — thứ DUY NHẤT còn phân biệt được bốn nguyên
   nhân sau khi nút đã gộp làm một. */
.hc-contact-reason {
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--hc-muted);
    text-align: center;
    margin: 2px 0 8px;
}
.hc-state-sold_out  .hc-contact-reason { color: var(--hc-danger); }
.hc-state-api_error .hc-contact-reason { color: var(--hc-warning); }

/* Trong THẺ PHÒNG thì cột giá hẹp nên nút trải hết bề ngang là đúng.
   Cùng nút đó ở khối trạng thái rỗng lại cần chiều rộng tự nhiên — vì vậy rule này
   phải bám vào `.room-price-utilities`, không để trần.
   ⚠️ Theme có `.hotel-room .room-list-utilities .button_style { background: primary;
   border: 0 !important }` (0-3-0) — thắng rule 0-2-0 cũ ⇒ nút ra NỀN xanh CHỮ xanh, đọc
   không được chữ nào. Phải 0-4-0, và viền vẽ bằng box-shadow để khỏi đấu !important. */
.hotel-room .hc-price-slot .room-price-utilities .hc-change-date-btn,
.room-price-utilities .hc-change-date-btn {
    display: block;
    width: 100%;
    margin-bottom: 6px;
    background: #fff;
    border: 0;
    box-shadow: inset 0 0 0 1px var(--hc-primary);
    color: var(--hc-primary);
}

/* Bữa ăn + chính sách huỷ (dữ liệu sống, đi theo hạng giá) */
.hc-rate-facts {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--hc-muted);
    text-align: inherit;
}
.hc-rate-facts li + li { margin-top: 2px; }

/* Trần TỔNG khách, chỉ hiện khi nó chặt hơn tổng hai nhóm */
.hc-capacity-total {
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--hc-muted);
    text-align: center;
    margin-top: 4px;
}

/* Nhãn cho trình đọc màn hình (theme có thể không có .sr-only) */
.hc-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

