/* =========================================================
   Booking popup (OPD / bed admission / surgery / emergency)
   Used on the hospital page and the surgery package page.
   ========================================================= */
.hbk-backdrop { position: fixed; inset: 0; z-index: 99990; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; padding: 20px; animation: hbkFade .15s ease; }
.hbk-modal { width: 100%; max-width: 620px; max-height: calc(100vh - 40px); background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(15,23,42,.35); display: flex; flex-direction: column; overflow: hidden; animation: hbkPop .18s ease; color: #0F172A; }
.hbk-head { display: flex; justify-content: space-between; gap: 12px; padding: 20px 24px 12px; }
.hbk-head h3 { margin: 0 0 10px; font-size: 19px; color: #123684; }
.hbk-close { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #F1F5F9; color: #475569; cursor: pointer; flex: none; }
.hbk-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; font-size: 12.5px; color: #94A3B8; font-weight: 600; }
.hbk-steps li { display: flex; align-items: center; gap: 7px; }
.hbk-steps li span { width: 22px; height: 22px; border-radius: 50%; background: #E2E8F0; color: #475569; display: grid; place-items: center; font-size: 11px; }
.hbk-steps li.is-current { color: #123684; } .hbk-steps li.is-current span { background: #123684; color: #fff; }
.hbk-steps li.is-done span { background: #059669; color: #fff; }
.hbk-body { padding: 4px 24px 22px; overflow-y: auto; }
.hbk-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid #E2E8F0; background: #fff; }
.hbk-estimate { font-weight: 700; color: #123684; font-size: 17px; } .hbk-estimate small { display: block; font-size: 10.5px; color: #64748B; font-weight: 500; text-transform: uppercase; }
.hbk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 10px; font-weight: 700; font-size: 14px; border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.hbk-btn-primary { background: #F72559; color: #fff; } .hbk-btn-primary:hover { background: #E01B4D; } .hbk-btn-ghost { background: #fff; color: #475569; border-color: #CBD5E1; }
.hbk-btn[disabled] { opacity: .55; cursor: not-allowed; }
.hbk-lead { font-size: 15px; font-weight: 600; margin: 4px 0 14px; }
.hbk-type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.hbk-type { text-align: left; border: 1.5px solid #E2E8F0; border-radius: 14px; padding: 16px; background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 6px; font-family: inherit; transition: .15s; }
.hbk-type:hover { border-color: #123684; background: #F5F8FF; transform: translateY(-1px); }
.hbk-type strong { font-size: 15px; color: #0F172A; } .hbk-type small { font-size: 12.5px; color: #64748B; line-height: 1.4; }
.hbk-type-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #E8EEFB; color: #123684; font-size: 18px; }
.hbk-type.is-emergency .hbk-type-icon { background: #FEE2E2; color: #DC2626; } .hbk-type.is-emergency:hover { border-color: #DC2626; background: #FFF5F5; }
.hbk-title { margin: 6px 0 14px; font-size: 16px; color: #0F172A; display: flex; align-items: center; gap: 10px; } .hbk-title i { color: #123684; } .hbk-title.is-emergency i { color: #DC2626; }
.hbk-label { display: block; font-size: 13px; font-weight: 700; color: #334155; margin: 12px 0 6px; } .hbk-label small { font-weight: 500; color: #94A3B8; }
.hbk-sub { margin: 20px 0 4px; font-size: 14px; color: #123684; padding-top: 14px; border-top: 1px solid #F1F5F9; }
.hbk-field input, .hbk-field select, .hbk-field textarea { width: 100%; border: 1px solid #CBD5E1; border-radius: 10px; padding: 11px 12px; font-size: 14px; font-family: inherit; background: #fff; }
.hbk-field input:focus, .hbk-field select:focus, .hbk-field textarea:focus { outline: none; border-color: #123684; box-shadow: 0 0 0 3px rgba(18,54,132,.12); }
.hbk-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .hbk-grid-2.tight { gap: 8px; }
.hbk-error { display: block; color: #DC2626; font-size: 12.5px; margin-top: 4px; }
.hbk-pick-list, .hbk-room-list { display: grid; gap: 8px; max-height: 300px; overflow-y: auto; padding: 2px; }
.hbk-pick, .hbk-room { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1.5px solid #E2E8F0; border-radius: 12px; padding: 11px 13px; background: #fff; cursor: pointer; font-family: inherit; }
.hbk-pick:hover, .hbk-room:hover:not(:disabled) { border-color: #123684; background: #F9FBFF; }
.hbk-pick.is-selected, .hbk-room.is-selected { border-color: #123684; background: #F0F5FF; box-shadow: 0 0 0 3px rgba(18,54,132,.12); }
.hbk-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg,#E0E7FF,#FCE7F3); color: #123684; font-weight: 800; font-size: 13px; display: grid; place-items: center; flex: none; }
.hbk-pick-main, .hbk-room-main { flex: 1; min-width: 0; display: flex; flex-direction: column; } .hbk-pick-main strong, .hbk-room-main strong { font-size: 14px; color: #0F172A; } .hbk-pick-main small, .hbk-room-main small { font-size: 12px; color: #64748B; margin-top: 2px; }
.hbk-pick em { font-style: normal; font-weight: 700; color: #123684; font-size: 13.5px; white-space: nowrap; }
.hbk-room-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; } .hbk-room-side b { color: #123684; font-size: 15px; } .hbk-room-side b small { font-weight: 500; color: #64748B; font-size: 11px; }
.pill { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.pill-ok { background: #DCFCE7; color: #166534; } .pill-few { background: #FEF3C7; color: #92400E; } .pill-booked { background: #FEE2E2; color: #B91C1C; }
.hbk-room.is-booked { background: #F8FAFC; border-style: dashed; cursor: not-allowed; } .hbk-room.is-booked .hbk-room-main strong, .hbk-room.is-booked .hbk-room-side b { color: #94A3B8; }
.hbk-seg { display: flex; gap: 6px; } .hbk-seg button { flex: 1; border: 1px solid #CBD5E1; background: #fff; border-radius: 10px; padding: 10px 6px; font-size: 13px; font-weight: 600; cursor: pointer; color: #334155; } .hbk-seg button.is-on { background: #123684; border-color: #123684; color: #fff; }
.hbk-alert { display: flex; gap: 10px; align-items: flex-start; background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.5; } .hbk-alert a { color: inherit; }
.hbk-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #EFF6FF; color: #1E3A8A; font-size: 12.5px; line-height: 1.5; }
.hbk-review { margin: 0; } .hbk-review > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid #F1F5F9; font-size: 14px; }
.hbk-review dt { color: #64748B; } .hbk-review dd { margin: 0; font-weight: 600; } .hbk-review dd small { display: block; font-weight: 500; color: #64748B; font-size: 12px; margin-top: 2px; } .hbk-review dd.bad { color: #DC2626; }
.hbk-review .total dd { font-size: 20px; color: #123684; }
.hbk-login, .hbk-success { text-align: center; padding: 22px 0 8px; } .hbk-login > i { font-size: 38px; color: #94A3B8; margin-bottom: 10px; }
.hbk-login h4, .hbk-success h4 { margin: 0 0 6px; font-size: 18px; } .hbk-login p, .hbk-success p { color: #64748B; font-size: 14px; line-height: 1.6; margin: 0 0 18px; }
.hbk-login-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hbk-success-icon { font-size: 54px; color: #059669; display: block; margin-bottom: 8px; }
.hbk-code { display: inline-block; margin: 0 0 18px; padding: 9px 18px; border-radius: 999px; background: #F1F5F9; font-size: 14px; } .hbk-code strong { letter-spacing: .5px; }
@keyframes hbkFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hbkPop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .hbk-backdrop { align-items: flex-end; padding: 0; }
  .hbk-modal { max-width: none; border-radius: 20px 20px 0 0; max-height: 94vh; }
  .hbk-grid-2 { grid-template-columns: 1fr; } .hbk-grid-2.tight { grid-template-columns: 1fr 1fr; }
  .hbk-body, .hbk-head, .hbk-foot { padding-left: 16px; padding-right: 16px; }
  .hbk-steps { gap: 10px; font-size: 11.5px; }
  .hbk-review > div { grid-template-columns: 96px 1fr; }
}
.pill { font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.hbk-grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
.hbk-sub .hbk-count { display: inline-block; margin-left: 6px; background: #123684; color: #fff; border-radius: 999px; padding: 1px 10px; font-size: 12px; }
.hbk-sub small { display: block; margin-top: 3px; font-weight: 500; color: #64748B; font-size: 12px; }
.hbk-patient { border: 1.5px solid #E2E8F0; border-radius: 14px; padding: 4px 14px 12px; margin-top: 10px; background: #FCFDFF; }
.hbk-patient-head { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; font-weight: 700; color: #123684; }
.hbk-patient-no { width: 22px; height: 22px; border-radius: 50%; background: #123684; color: #fff; display: grid; place-items: center; font-size: 11px; }
.hbk-link { margin-left: auto; border: 0; background: none; color: #DC2626; font-size: 12px; cursor: pointer; font-weight: 600; }
.hbk-add { width: 100%; margin-top: 10px; padding: 12px; border: 1.5px dashed #94A3B8; background: #fff; color: #123684; border-radius: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.hbk-add:hover { border-color: #123684; background: #F5F8FF; }
.hbk-bed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 10px; max-height: 220px; overflow-y: auto; padding: 2px; }
.hbk-bed { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 1.5px solid #A7F3D0; background: #F0FDF9; border-radius: 12px; cursor: pointer; font-family: inherit; }
.hbk-bed i { color: #059669; font-size: 15px; } .hbk-bed strong { font-size: 13px; color: #0F172A; } .hbk-bed small { font-size: 10.5px; color: #64748B; }
.hbk-bed:hover { border-color: #059669; } .hbk-bed.is-selected { background: #123684; border-color: #123684; } .hbk-bed.is-selected i, .hbk-bed.is-selected strong, .hbk-bed.is-selected small { color: #fff; }
@media (max-width: 640px) { .hbk-grid-3 { grid-template-columns: 1fr 1fr; } .hbk-grid-3 > :first-child { grid-column: 1 / -1; } }
.hbk-when { align-items: end; }
.hbk-static { height: 44px; display: flex; align-items: center; padding: 0 12px; border: 1px dashed #CBD5E1; border-radius: 10px; font-weight: 700; color: #123684; background: #F8FAFC; font-size: 14px; }
.hbk-legend { display: flex; gap: 14px; font-size: 12px; color: #64748B; margin: -2px 0 8px; }
.hbk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hbk-legend .lg { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.hbk-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; max-height: 340px; overflow-y: auto; padding: 2px; }
.hbk-map-room { border: 1.5px solid #E2E8F0; border-radius: 14px; padding: 10px; background: #fff; }
.hbk-map-room.is-private { background: #FCFDFF; }
.hbk-map-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.hbk-map-head strong { font-size: 13.5px; color: #0F172A; } .hbk-map-head small { font-size: 11.5px; color: #64748B; }
.hbk-map-beds { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; }
.hbk-map-beds .hbk-bed { padding: 8px 4px; }
.hbk-map-beds .hbk-bed small { font-size: 10px; }
.hbk-bed.is-booked { background: #F1F5F9; border: 1.5px dashed #CBD5E1; cursor: not-allowed; }
.hbk-bed.is-booked i, .hbk-bed.is-booked strong { color: #94A3B8; } .hbk-bed.is-booked small { color: #94A3B8; }
.hbk-patient-bed { margin-left: 6px; font-size: 11.5px; font-weight: 600; color: #047857; background: #ECFDF5; border-radius: 999px; padding: 2px 9px; }
.hbk-review dd small { display: block; }
.lg-free { background: #D1FAE5; border: 1px solid #34D399; } .lg-picked { background: #123684; } .lg-booked { background: #E2E8F0; border: 1px solid #CBD5E1; }


/* Room photos in the booking flow */
.hbk-room-card { padding: 8px; gap: 10px; cursor: default; align-items: stretch; }
.hbk-room-card.is-booked { cursor: default; }
.hbk-room-photo { position: relative; flex: none; width: 104px; height: 78px; border: 0; padding: 0; border-radius: 10px; overflow: hidden; background: #EEF2F7; cursor: zoom-in; }
.hbk-room-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.hbk-room-photo:hover img { transform: scale(1.06); }
.hbk-room-photo:focus-visible { outline: 3px solid rgba(18,54,132,.45); outline-offset: 2px; }
.hbk-room-photo-count { position: absolute; right: 6px; bottom: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(15,23,42,.72); color: #fff; font-size: 11px; font-weight: 600; backdrop-filter: blur(4px); }
.hbk-room-photo.is-empty { cursor: default; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #94A3B8; font-size: 20px; border: 1.5px dashed #CBD5E1; background: #F8FAFC; }
.hbk-room-photo.is-empty small { font-size: 10.5px; font-weight: 600; }
.hbk-room-pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; text-align: left; font-family: inherit; padding: 4px 6px; cursor: pointer; border-radius: 8px; }
.hbk-room-pick:disabled { cursor: not-allowed; }
.hbk-room-pick:focus-visible { outline: 3px solid rgba(18,54,132,.35); }
.hbk-room-card.is-booked .hbk-room-photo img { filter: grayscale(.6); opacity: .7; }

.hbk-photo-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 4px; scroll-snap-type: x mandatory; }
.hbk-photo-strip button { flex: none; width: 140px; height: 96px; border: 0; padding: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; scroll-snap-align: start; background: #EEF2F7; box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.hbk-photo-strip img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.hbk-photo-strip button:hover img { transform: scale(1.05); }

.hbk-lightbox { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8,15,35,.86); backdrop-filter: blur(6px); }
.hbk-lightbox-inner { width: min(960px, 100%); display: flex; flex-direction: column; gap: 10px; color: #fff; }
.hbk-lightbox-head { display: flex; align-items: center; gap: 12px; }
.hbk-lightbox-head strong { font-size: 16px; }
.hbk-lightbox-head span { font-size: 13px; color: rgba(255,255,255,.7); }
.hbk-lightbox-close { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 16px; cursor: pointer; }
.hbk-lightbox-stage { position: relative; display: flex; align-items: center; justify-content: center; border-radius: 16px; overflow: hidden; background: #0F172A; }
.hbk-lightbox-stage img { max-width: 100%; max-height: 70vh; object-fit: contain; display: block; }
.hbk-lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #0F172A; font-size: 16px; cursor: pointer; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.hbk-lightbox-nav.is-prev { left: 12px; }
.hbk-lightbox-nav.is-next { right: 12px; }
.hbk-lightbox-caption { margin: 0; font-size: 13px; color: rgba(255,255,255,.8); text-align: center; }
.hbk-lightbox-thumbs { display: flex; gap: 8px; overflow-x: auto; justify-content: center; padding-bottom: 4px; }
.hbk-lightbox-thumbs button { flex: none; width: 64px; height: 46px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; opacity: .6; background: none; }
.hbk-lightbox-thumbs button.is-active { border-color: #F72559; opacity: 1; }
.hbk-lightbox-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 560px) {
    .hbk-room-card { flex-wrap: wrap; }
    .hbk-room-photo { width: 100%; height: 140px; }
    .hbk-photo-strip button { width: 120px; height: 84px; }
    .hbk-lightbox { padding: 12px; }
    .hbk-lightbox-nav { width: 38px; height: 38px; }
}
.hbk-room-list { max-height: 400px; }
