/* =============================================
   Hotel Booking Razorpay Pro v2.0 — Frontend
   Primary: #E8851A  Dark: #5C2E0A  Light: #fff
   ============================================= */

#hbr-wrap {
    max-width: 760px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    color: #333;
    position: relative;
}

/* ── Step Indicator ──────────────────────────────── */
.hbr-step-header { margin-bottom: 28px; }
.hbr-step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}
.hbr-step-dot {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #ddd;
    color: #999;
    font-size: 14px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}
.hbr-step-dot.active { background: #E8851A; color: #fff; }
.hbr-step-dot.done   { background: #28a745; color: #fff; }
.hbr-step-line {
    height: 3px; width: 80px;
    background: #ddd;
    flex-shrink: 0;
    transition: background 0.3s;
}
.hbr-step-line.active { background: #E8851A; }

/* ── Titles ──────────────────────────────────────── */
.hbr-title {
    font-size: 24px; font-weight: 700;
    color: #5C2E0A;
    border-bottom: 3px solid #E8851A;
    padding-bottom: 10px;
    margin-bottom: 24px;
}
.hbr-subtitle {
    font-size: 17px; font-weight: 600;
    color: #5C2E0A;
    margin: 24px 0 14px;
}

/* ── Property Cards ──────────────────────────────── */
.hbr-property-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}
.hbr-property-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.hbr-property-card:hover {
    border-color: #E8851A;
    box-shadow: 0 4px 16px rgba(232,133,26,0.15);
    transform: translateY(-2px);
}
.hbr-property-card.selected {
    border-color: #E8851A;
    box-shadow: 0 0 0 3px rgba(232,133,26,0.2);
}
.hbr-prop-img {
    height: 130px;
    background-size: cover;
    background-position: center;
    background-color: #f0e0cc;
}
.hbr-prop-info { padding: 12px 14px; }
.hbr-prop-info h4 { margin: 0 0 4px; font-size: 15px; color: #5C2E0A; }
.hbr-prop-info p  { margin: 0 0 4px; font-size: 13px; color: #666; }
.hbr-prop-info small { color: #E8851A; font-size: 12px; }

/* ── Room Cards ──────────────────────────────────── */
#hbr-room-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 14px;
}
.hbr-room-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.hbr-room-card:hover {
    border-color: #E8851A;
    box-shadow: 0 4px 16px rgba(232,133,26,0.15);
    transform: translateY(-2px);
}
.hbr-room-card.selected {
    border-color: #E8851A;
    box-shadow: 0 0 0 3px rgba(232,133,26,0.2);
}
.hbr-room-thumb {
    height: 120px;
    background-size: cover;
    background-position: center;
    background-color: #f0e0cc;
    position: relative;
}
.hbr-room-price-badge {
    position: absolute;
    bottom: 8px; right: 8px;
    background: #E8851A;
    color: #fff;
    font-size: 12px; font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
}
.hbr-room-card-info { padding: 10px 12px; }
.hbr-room-card-info h4 { margin: 0 0 4px; font-size: 14px; color: #5C2E0A; }
.hbr-room-card-info small { color: #777; font-size: 12px; }

/* ── Room Detail Panel ───────────────────────────── */
.hbr-room-detail {
    border: 2px solid #E8851A;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
}
.hbr-gallery {
    background: #000;
    position: relative;
}
.hbr-gallery-main {
    position: relative;
    height: 280px;
    overflow: hidden;
}
.hbr-gallery-main img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.hbr-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: none;
    font-size: 28px;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
    z-index: 2;
}
.hbr-gallery-nav:hover { background: rgba(232,133,26,0.85); }
.hbr-gallery-prev { left: 10px; }
.hbr-gallery-next { right: 10px; }
.hbr-gallery-counter {
    position: absolute;
    bottom: 8px; right: 12px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}
.hbr-gallery-thumbs {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: #111;
    overflow-x: auto;
}
.hbr-gallery-thumbs img {
    width: 56px; height: 44px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.65;
    border: 2px solid transparent;
    transition: opacity 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.hbr-gallery-thumbs img.active,
.hbr-gallery-thumbs img:hover { opacity: 1; border-color: #E8851A; }

.hbr-room-info-panel { padding: 18px 20px; }
.hbr-room-info-panel h3 { margin: 0 0 6px; font-size: 20px; color: #5C2E0A; }
.hbr-detail-price { font-size: 22px; font-weight: 700; color: #E8851A; margin: 0 0 12px; }
.hbr-detail-price small { font-size: 14px; font-weight: 400; color: #888; }
.hbr-detail-desc { font-size: 14px; color: #555; line-height: 1.6; margin-bottom: 14px; }

.hbr-amenities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.hbr-amenity-tag {
    background: #fff8f0;
    border: 1px solid #f0d0a0;
    color: #5C2E0A;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 14px;
}
.hbr-capacity-info {
    font-size: 13px;
    color: #777;
    background: #f9f9f9;
    padding: 8px 12px;
    border-radius: 6px;
}

/* ── Form Grid ───────────────────────────────────── */
.hbr-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.hbr-full { grid-column: 1 / -1; }
.hbr-field { display: flex; flex-direction: column; gap: 6px; }
.hbr-field label { font-size: 14px; font-weight: 600; color: #5C2E0A; }
.hbr-field .req { color: #E8851A; }
.hbr-field input,
.hbr-field select {
    padding: 10px 13px;
    border: 1.5px solid #ddd;
    border-radius: 7px;
    font-size: 15px;
    color: #333;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.hbr-field input:focus,
.hbr-field select:focus {
    outline: none;
    border-color: #E8851A;
    box-shadow: 0 0 0 3px rgba(232,133,26,0.12);
}
.hbr-hint { font-size: 12px; color: #888; }

/* ── Price Box ───────────────────────────────────── */
.hbr-price-box {
    background: #fff8f0;
    border: 1.5px solid #E8851A;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 18px 0;
}
.hbr-price-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 14px;
    border-bottom: 1px solid #f0e0cc;
}
.hbr-price-row:last-child { border-bottom: none; }
.hbr-price-total {
    font-size: 18px; font-weight: 700;
    color: #E8851A;
    padding-top: 12px;
    margin-top: 4px;
    border-top: 2px solid #E8851A !important;
}

/* ── Step 2 Summary ──────────────────────────────── */
.hbr-step2-summary {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #555;
}
.hbr-step2-summary strong { color: #5C2E0A; }

/* ── Payment Options ─────────────────────────────── */
.hbr-pay-cards { display: flex; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.hbr-pay-card {
    flex: 1;
    min-width: 160px;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s;
    position: relative;
}
.hbr-pay-card input[type=radio] { position: absolute; opacity: 0; }
.hbr-pay-card:has(input:checked) { border-color: #E8851A; background: #fff8f0; }
.hbr-pay-card-inner {
    padding: 16px;
    display: flex; flex-direction: column;
    align-items: center; text-align: center; gap: 4px;
}
.hbr-pay-icon { font-size: 28px; }
.hbr-pay-card-inner strong { font-size: 15px; color: #333; }
.hbr-pay-card-inner small { font-size: 12px; color: #888; }
.hbr-pay-amount { font-size: 20px; font-weight: 700; color: #E8851A; }
.hbr-pay-amount.hbr-partial { color: #28a745; }

.hbr-balance-note {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    color: #856404;
    margin-top: 4px;
}

/* ── Final Summary ───────────────────────────────── */
.hbr-final-summary {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.hbr-final-summary table { width: 100%; border-collapse: collapse; }
.hbr-final-summary td {
    padding: 9px 6px;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}
.hbr-final-summary td:first-child { font-weight: 600; color: #5C2E0A; width: 46%; }
.hbr-final-summary .hbr-fs-total td { font-size: 17px; font-weight: 700; color: #E8851A; border: none; }

/* ── Buttons ─────────────────────────────────────── */
.hbr-btn {
    padding: 12px 26px;
    border: none; border-radius: 7px;
    font-size: 15px; font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.hbr-btn:active { transform: scale(0.98); }
.hbr-btn-primary {
    background: #E8851A; color: #fff;
    width: 100%; margin-top: 10px;
}
.hbr-btn-primary:hover:not(:disabled) { background: #c96f10; }
.hbr-btn-primary:disabled { background: #ccc; cursor: not-allowed; }
.hbr-btn-secondary {
    background: #fff; color: #5C2E0A;
    border: 2px solid #5C2E0A;
}
.hbr-btn-secondary:hover { background: #5C2E0A; color: #fff; }
.hbr-btn-pay {
    flex: 1;
    background: #28a745; color: #fff;
    font-size: 16px;
}
.hbr-btn-pay:hover { background: #1e7e34; }
.hbr-btn-row { display: flex; gap: 12px; margin-top: 10px; }
.hbr-btn-row .hbr-btn-primary { margin-top: 0; }
.hbr-secure { text-align: center; font-size: 12px; color: #aaa; margin-top: 10px; }

/* ── Error ───────────────────────────────────────── */
.hbr-error {
    background: #fff0f0;
    border: 1px solid #f5c6cb;
    color: #c0392b;
    padding: 10px 14px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 14px;
}

/* ── Success ─────────────────────────────────────── */
.hbr-success-wrap { text-align: center; padding: 30px 20px; }
.hbr-success-icon { font-size: 72px; margin-bottom: 10px; }
.hbr-success-wrap h2 { font-size: 28px; color: #28a745; margin-bottom: 10px; }
.hbr-success-msg { font-size: 15px; color: #555; margin-bottom: 20px; }
.hbr-success-detail {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 16px;
    max-width: 440px;
    margin: 0 auto 16px;
    text-align: left;
    font-size: 14px;
}
.hbr-success-detail p { margin: 6px 0; padding-bottom: 6px; border-bottom: 1px solid #eee; }
.hbr-success-detail p:last-child { border: none; }
.hbr-success-email { font-size: 13px; color: #888; }

/* ── Loading ─────────────────────────────────────── */
.hbr-loading {
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.88);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 99; border-radius: 12px;
}
.hbr-spinner {
    width: 46px; height: 46px;
    border: 4px solid #f0e0cc;
    border-top-color: #E8851A;
    border-radius: 50%;
    animation: hbr-spin 0.75s linear infinite;
    margin-bottom: 12px;
}
@keyframes hbr-spin { to { transform: rotate(360deg); } }

/* ── Notice ──────────────────────────────────────── */
.hbr-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    color: #856404;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 560px) {
    .hbr-form-grid { grid-template-columns: 1fr; }
    .hbr-full { grid-column: 1; }
    .hbr-btn-row { flex-direction: column-reverse; }
    .hbr-property-cards,
    #hbr-room-cards { grid-template-columns: 1fr; }
    .hbr-pay-cards { flex-direction: column; }
    .hbr-gallery-main { height: 200px; }
    .hbr-step-line { width: 40px; }
}

/* ── Pre-fill Banner (when room is passed via URL) ── */
.hbr-prefill-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff8f0;
    border: 2px solid #E8851A;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.hbr-prefill-thumb {
    width: 80px; height: 60px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: #f0d0a0;
    flex-shrink: 0;
}
.hbr-prefill-info { flex: 1; }
.hbr-prefill-info .hbr-prefill-prop {
    font-size: 11px;
    font-weight: 700;
    color: #E8851A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 2px;
}
.hbr-prefill-info h3 {
    font-size: 17px;
    color: #5C2E0A;
    margin: 0 0 2px;
}
.hbr-prefill-price {
    font-size: 15px;
    font-weight: 700;
    color: #E8851A;
}
.hbr-prefill-price small { font-weight: 400; color: #999; font-size: 12px; }
.hbr-prefill-change {
    font-size: 13px;
    color: #888;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 12px;
    white-space: nowrap;
    transition: border-color 0.2s, color 0.2s;
}
.hbr-prefill-change:hover { border-color: #E8851A; color: #E8851A; }
