/* 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;
}

/* Rate select dropdown */
.hc-rate-select {
    width: 100%;
    margin-bottom: 8px;
    font-size: 12px;
    padding: 6px 8px;
    border: 1px solid var(--hc-border);
    border-radius: 6px;
    background: #fff;
}
.hc-rate-select:focus {
    border-color: var(--hc-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Price display */
.hc-price-display {
    color: var(--hc-accent);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

/* Allotment indicator */
.hc-allotment-display {
    font-size: 12px;
    margin: 4px 0;
}

/* 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;
}

/* 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. */
.room-price-utilities .hc-change-date-btn {
    display: block;
    width: 100%;
    margin-bottom: 6px;
    background: transparent;
    border: 1px solid 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 0 8px;
    padding: 0;
    font-size: 12px;
    line-height: 1.5;
    color: var(--hc-muted);
    text-align: center;
}
.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;
}

