/* ===== NCOE Hotel Booking Widget ===== */
#nhb-booking-widget * { box-sizing: border-box; }
#nhb-booking-widget { font-family: 'Segoe UI', Arial, sans-serif; max-width: 1100px; margin: 0 auto; }

/* ===== SEARCH BOX ===== */
.nhb-search-box {
    background: #1a3a6b;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    margin-bottom: 30px;
}
.nhb-search-header {
    background: #0f2547;
    padding: 16px 25px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
}
.nhb-search-header h2 {
    color: #ffffff !important;
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}
.nhb-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 20px 22px;
    align-items: flex-end;
}

/* Field groups */
.nhb-field-group { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 155px; }
.nhb-field-group.nhb-field-small { min-width: 130px; flex: 0 1 auto; }
.nhb-field-group.nhb-field-btn { flex: 0 0 auto; align-self: flex-end; }

.nhb-field-group label {
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Input wrapper */
.nhb-input-wrap { position: relative; display: flex; align-items: center; }
.nhb-icon {
    position: absolute;
    left: 10px;
    font-size: 15px;
    pointer-events: none;
    z-index: 2;
    line-height: 1;
}

/* All inputs and selects inside search form */
.nhb-search-form .nhb-input-wrap input[type="date"],
.nhb-search-form .nhb-input-wrap select {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 34px;
    border: 2px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    color: #ffffff !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.nhb-search-form .nhb-input-wrap input[type="date"]:focus,
.nhb-search-form .nhb-input-wrap select:focus {
    border-color: #f0a500;
    background: rgba(255,255,255,0.18);
}

/* Date input text color fix */
.nhb-search-form .nhb-input-wrap input[type="date"] {
    color-scheme: dark;
}
.nhb-search-form .nhb-input-wrap input[type="date"]::-webkit-datetime-edit { color: #ffffff; }
.nhb-search-form .nhb-input-wrap input[type="date"]::-webkit-datetime-edit-fields-wrapper { color: #ffffff; }
.nhb-search-form .nhb-input-wrap input[type="date"]::-webkit-datetime-edit-text { color: rgba(255,255,255,0.7); }
.nhb-search-form .nhb-input-wrap input[type="date"]::-webkit-datetime-edit-month-field { color: #ffffff; }
.nhb-search-form .nhb-input-wrap input[type="date"]::-webkit-datetime-edit-day-field { color: #ffffff; }
.nhb-search-form .nhb-input-wrap input[type="date"]::-webkit-datetime-edit-year-field { color: #ffffff; }
.nhb-search-form .nhb-input-wrap input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(2);
    cursor: pointer;
    opacity: 0.85;
    width: 18px;
    height: 18px;
}
.nhb-search-form .nhb-input-wrap input[type="date"]::-webkit-inner-spin-button { display: none; }

/* Select arrow */
.nhb-select-wrap::after {
    content: '▾';
    position: absolute;
    right: 10px;
    color: #ffffff;
    pointer-events: none;
    font-size: 13px;
    z-index: 2;
}
.nhb-search-form .nhb-input-wrap select option {
    background: #1a3a6b;
    color: #ffffff;
}

/* Room select - special wider treatment */
.nhb-field-group.nhb-field-room { min-width: 180px; flex: 1 1 auto; }
.nhb-field-group.nhb-field-room select {
    padding-right: 30px;
}

/* ===== BUTTONS ===== */
.nhb-btn-primary {
    background: linear-gradient(135deg, #f0a500, #e08500);
    color: #ffffff !important;
    border: none;
    padding: 0 22px;
    height: 42px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}
.nhb-btn-primary:hover { background: linear-gradient(135deg, #ffb820, #f09500); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(240,165,0,0.4); }
.nhb-btn-primary.nhb-btn-large { padding: 14px 32px; height: auto; font-size: 15px; }
.nhb-btn-secondary {
    background: #e0e0e0;
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.nhb-btn-secondary:hover { background: #ccc; }
.nhb-btn-book {
    background: linear-gradient(135deg, #1a3a6b, #0f2547);
    color: #fff !important;
    border: none;
    padding: 11px 18px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
    letter-spacing: 0.4px;
    transition: all 0.2s;
    text-transform: uppercase;
}
.nhb-btn-book:hover { background: linear-gradient(135deg, #2a5090, #1a3a6b); box-shadow: 0 3px 10px rgba(26,58,107,0.4); }

/* ===== ERROR BANNER ===== */
.nhb-error-banner {
    background: #c0392b;
    color: #fff;
    padding: 10px 20px;
    border-radius: 7px;
    font-size: 14px;
    margin: 0 20px 15px;
}

/* ===== RESULTS ===== */
.nhb-results { margin-top: 10px; }
.nhb-results-summary {
    font-size: 14px;
    color: #444;
    padding: 12px 4px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
    font-weight: 600;
}
.nhb-rooms-list { display: flex; flex-direction: column; gap: 20px; }

/* ===== ROOM CARD ===== */
.nhb-room-card {
    display: flex;
    background: #fff;
    border: 1px solid #dde3ef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s, transform 0.2s;
}
.nhb-room-card.nhb-available:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.14); transform: translateY(-2px); }
.nhb-room-card.nhb-unavailable { background: #fdf0f0; border-color: #f5c6c6; opacity: 0.82; }
.nhb-room-image { width: 220px; min-width: 220px; overflow: hidden; }
.nhb-room-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nhb-room-image-placeholder {
    width: 100%; height: 100%; min-height: 170px;
    background: linear-gradient(135deg, #c8d4e8, #a8bcd4);
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; color: #5a7090; font-size: 13px; gap: 8px;
}
.nhb-room-image-placeholder .nhb-placeholder-icon { font-size: 40px; }
.nhb-room-info { flex: 1; padding: 20px 18px; }
.nhb-room-name { font-size: 18px; font-weight: 700; color: #1a3a6b; margin: 0 0 8px; }
.nhb-room-desc { font-size: 13px; color: #666; line-height: 1.6; margin: 0 0 12px; }
.nhb-room-amenities { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.nhb-amenity-tag {
    background: #e8f0ff; color: #1a3a6b;
    padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
}
.nhb-room-capacity { display: flex; gap: 14px; color: #777; font-size: 13px; }

.nhb-room-price-box {
    width: 210px; min-width: 210px;
    padding: 20px 16px;
    border-left: 1px solid #e0e8f0;
    background: #f7f9fd;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center;
}
.nhb-price-night { display: flex; align-items: baseline; gap: 1px; justify-content: center; }
.nhb-currency { font-size: 18px; color: #1a3a6b; font-weight: 700; }
.nhb-amount { font-size: 30px; font-weight: 800; color: #1a3a6b; line-height: 1; }
.nhb-per { font-size: 12px; color: #888; margin-left: 3px; }
.nhb-price-total { font-size: 12px; color: #555; margin-top: 5px; margin-bottom: 2px; }
.nhb-unavailable-msg {
    background: #fde8e8; color: #c0392b;
    padding: 10px 12px; border-radius: 7px;
    font-size: 12px; font-weight: 700;
    margin-top: 10px; width: 100%; text-align: center;
    display: flex; align-items: center; justify-content: center; gap: 5px;
}

/* ===== MODAL ===== */
.nhb-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.nhb-modal {
    background: #fff; border-radius: 14px;
    width: 100%; max-width: 680px; max-height: 90vh;
    overflow-y: auto; position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    animation: nhbSlideUp 0.25s ease;
}
@keyframes nhbSlideUp { from { transform: translateY(30px); opacity:0 } to { transform: translateY(0); opacity:1 } }
.nhb-modal-close {
    position: absolute; top: 14px; right: 14px;
    background: rgba(255,255,255,0.2); border: none;
    width: 32px; height: 32px; border-radius: 50%;
    cursor: pointer; font-size: 16px; color: #fff;
    z-index: 10; display: flex; align-items: center; justify-content: center;
}
.nhb-modal-close:hover { background: rgba(255,255,255,0.35); }

/* ===== BOOKING FORM ===== */
.nhb-booking-header { background: linear-gradient(135deg, #1a3a6b, #0f2547); padding: 22px 28px; border-radius: 14px 14px 0 0; }
.nhb-booking-header h2 { color: #fff !important; margin: 0; font-size: 20px; }
.nhb-booking-summary-bar {
    background: #eef3ff; padding: 12px 28px;
    display: flex; flex-wrap: wrap; gap: 10px;
    border-bottom: 1px solid #d0dbf0; font-size: 13px; color: #3a5580;
}
.nhb-total-highlight { font-weight: 700; color: #1a3a6b; background: #d0e0ff; padding: 2px 10px; border-radius: 20px; }
.nhb-form-body { padding: 22px 28px; }
.nhb-form-row { display: flex; gap: 16px; margin-bottom: 16px; }
.nhb-form-field { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nhb-form-field label { font-size: 13px; font-weight: 600; color: #333; }
.nhb-form-field input,
.nhb-form-field textarea,
.nhb-form-field select {
    padding: 10px 14px; border: 1.5px solid #c5d0e0;
    border-radius: 7px; font-size: 14px; outline: none;
    transition: border-color 0.2s; font-family: inherit; color: #222;
}
.nhb-form-field input:focus, .nhb-form-field textarea:focus { border-color: #1a3a6b; }
.nhb-form-actions { display: flex; gap: 14px; margin-top: 12px; }

/* ===== BOOKING SUCCESS ===== */
.nhb-booking-success { padding: 40px 32px; text-align: center; }
.nhb-success-icon { font-size: 60px; margin-bottom: 16px; }
.nhb-booking-success h2 { font-size: 24px; color: #1a3a6b; margin: 0 0 10px; }
.nhb-booking-success > p { color: #666; margin-bottom: 24px; }
.nhb-success-details { background: #f4f8ff; border: 1px solid #c5d5f5; border-radius: 10px; padding: 20px; text-align: left; margin-bottom: 20px; }
.nhb-success-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #e0e8f5; font-size: 14px; }
.nhb-success-row:last-child { border-bottom: none; }
.nhb-total-row { font-size: 16px; font-weight: 700; color: #1a3a6b; }
.nhb-success-note { font-size: 13px; color: #888; margin-bottom: 20px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 850px) {
    .nhb-search-form { flex-direction: column; }
    .nhb-field-group, .nhb-field-group.nhb-field-small, .nhb-field-group.nhb-field-room { min-width: 100%; flex: 1 1 100%; }
    .nhb-field-group.nhb-field-btn { width: 100%; }
    .nhb-field-group.nhb-field-btn .nhb-btn-primary { width: 100%; justify-content: center; }
    .nhb-room-card { flex-direction: column; }
    .nhb-room-image { width: 100%; min-width: auto; height: 200px; }
    .nhb-room-price-box { width: 100%; min-width: auto; border-left: none; border-top: 1px solid #e0e8f0; }
    .nhb-form-row { flex-direction: column; }
    .nhb-booking-summary-bar { flex-direction: column; gap: 6px; }
}
