/* OSC Room Booking V98 — isolated weekly planner and archive */
#roomBookingRoot{--rb-wine:#781d3b;--rb-muted:#756e73;--rb-border:#eee6e9;--rb-soft:#faf5f7;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
#roomBookingRoot *,.rb-modal-shade *{box-sizing:border-box}
.rb-hero{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:25px 27px;margin-bottom:16px;background:linear-gradient(118deg,#fff,#fcf6f8);border:1px solid #eee1e5;border-radius:21px}
.rb-kicker{font-size:10px;font-weight:850;letter-spacing:.15em;color:#9a5369}
.rb-hero h2{color:#381b29;font-size:clamp(21px,3vw,29px);font-weight:850;margin:7px 0 8px;letter-spacing:-.025em}
.rb-hero p,.rb-week-header p,.rb-history-header p{color:#756e73;font-size:13px;line-height:1.7;margin:0;max-width:600px}
.rb-hero-buttons,.rb-pager{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.rb-button{font:700 13px/1.3 Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;cursor:pointer;border-radius:11px;padding:10px 15px;border:1px solid transparent;min-height:42px;white-space:nowrap;box-shadow:none!important;transition:transform .15s,background .15s}
.rb-button:hover:not(:disabled){transform:translateY(-1px)}
.rb-button:focus-visible,.rb-edit:focus-visible,.rb-tabs button:focus-visible{outline:3px solid #dca3b5;outline-offset:2px}
.rb-button:disabled{opacity:.36;cursor:not-allowed}
.rb-primary{background:#781d3b!important;color:#fff!important}
.rb-primary:hover:not(:disabled){background:#942c4c!important}
.rb-outline{background:#fff!important;color:#5a3f49!important;border-color:#e7d9dd!important}
.rb-outline:hover:not(:disabled){background:#fcf0f4!important}
.rb-danger{background:#fff1f3!important;color:#992f4b!important;border-color:#f3dbe0!important}
.rb-view{font-size:12px;background:#f2eff1;border:1px solid #e5dfe1;border-radius:999px;padding:8px 13px;color:#75666f;font-weight:650}
.rb-tabs{display:flex;gap:6px;margin:0 0 15px;background:#f7f2f4;border:1px solid #ece4e7;border-radius:13px;padding:5px;width:max-content;max-width:100%}
.rb-tabs button{background:transparent;border:0;border-radius:10px;padding:10px 15px;cursor:pointer;font-size:13px;font-weight:750;color:#73646a}
.rb-tabs button.active{background:#fff;color:#781d3b;box-shadow:0 3px 11px rgba(69,25,42,.08)}
.rb-notice{color:#9c3951;font-size:12px;margin:0}
.rb-notice:empty{display:none}
.rb-week-header,.rb-history-header{display:flex;justify-content:space-between;align-items:center;gap:17px;margin:0 0 14px;padding:17px 21px;border:1px solid var(--rb-border);border-radius:16px;background:#fff}
.rb-week-header h3,.rb-history-header h3{font-size:19px;font-weight:800;color:#33232b;margin:5px 0}
.rb-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:14px}
.rb-stats>div{display:grid;gap:4px;padding:16px 20px;border-radius:14px;background:#fff;border:1px solid #eee6e9}
.rb-stats span{font-size:12px;color:#80767c}
.rb-stats strong{font-size:23px;color:#6b2240;line-height:1.2}
.rb-week-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;align-items:stretch}
.rb-day{border:1px solid #e9e2e5;border-radius:14px;min-height:200px;background:#fff;overflow:hidden;min-width:0}
.rb-day.rb-current{border-color:#bb8194;box-shadow:0 6px 17px rgba(120,29,59,.09)}
.rb-day.rb-expired{background:#f9f7f8}
.rb-day-title{display:grid;gap:2px;padding:11px 10px;border-bottom:1px solid #ece5e7;background:#f8f4f5}
.rb-day.rb-current .rb-day-title{background:#f7e8ed}
.rb-day-title span{font-size:11px;color:#735e66;font-weight:700}
.rb-day-title b{font-size:19px;color:#4a303c}
.rb-day-content{display:grid;gap:8px;padding:9px;align-content:start}
.rb-empty-day{font-size:11px;color:#999096;text-align:center;padding:18px 3px;line-height:1.6}
.rb-item{display:flex;flex-direction:column;gap:5px;border-radius:10px;background:#fcf7f8;border:1px solid #efdee4;padding:9px 8px;overflow-wrap:anywhere}
/* Synced room use: rehearsal is occupied, never an editable Room Booking record. */
#roomBookingRoot .rb-item.rb-rehearsal{background:#fff3e9;border-color:#ecc9a6;border-left:4px solid #a45717}
#roomBookingRoot .rb-item.rb-rehearsal .rb-hours{color:#83400d}
#roomBookingRoot .rb-item.rb-vacant{background:#f5faf6;border-color:#d2e9d9}

.rb-hours{font-size:11px;font-weight:850;color:#85274c}
.rb-item strong{font-size:13px;color:#342530;font-weight:800}
.rb-item>span:not(.rb-hours){font-size:11px;color:#74646b;line-height:1.45}
.rb-edit{padding:4px 0;background:none;border:0;color:#87314e;font-size:11px;font-weight:800;text-align:left;cursor:pointer;align-self:flex-start;min-height:0}
.rb-history-counter{background:#f9f0f3;color:#842b4c;font-size:12px;font-weight:800;padding:9px 13px;border-radius:999px}
.rb-history-list{display:grid;gap:10px}
.rb-history-row{display:grid;grid-template-columns:155px minmax(0,1fr) auto;align-items:center;gap:22px;background:#fff;border:1px solid #ede5e8;border-radius:14px;padding:17px 20px}
#roomBookingRoot .rb-history-row.rb-history-rehearsal{border-left:4px solid #a45717;background:#fff9f3}

.rb-history-when,.rb-history-about{display:grid;gap:5px}
.rb-history-when b{font-size:14px;color:#6a2540}
.rb-history-when span{font-size:12px;color:#7a7176}
.rb-history-about strong{font-size:16px;color:#30222c}
.rb-history-about>span{font-size:13px;color:#574d52}
.rb-history-about small{font-size:11px;color:#8a8287}
.rb-past-pill{font-size:11px;font-weight:750;border-radius:999px;background:#f4eff1;color:#786a71;padding:7px 10px;white-space:nowrap}
.rb-blank{padding:45px 20px;text-align:center;color:#8a8287;background:#fff;border:1px dashed #dcd2d7;border-radius:15px}
.rb-more{display:flex;justify-content:center;margin:20px}
.rb-modal-shade{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;padding:17px;background:rgba(28,15,22,.55);backdrop-filter:blur(6px);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
.rb-modal{width:min(590px,100%);max-height:90dvh;overflow:auto;background:#fff;border-radius:22px;padding:25px 27px;box-shadow:0 35px 100px rgba(30,16,20,.32)}
.rb-modal-head{display:flex;align-items:start;justify-content:space-between;gap:12px;margin-bottom:19px}
.rb-modal-head h3{font-size:23px;font-weight:850;color:#32222b;margin:6px 0 0}
.rb-x{background:#f7f1f3;border:0;border-radius:10px;color:#6a5360;cursor:pointer;width:35px;height:35px;font-size:21px}
#rbForm{display:grid;gap:15px}
#rbForm label{display:grid;gap:6px;font-size:12px;font-weight:800;color:#54454e}
#rbForm input,#rbForm select{width:100%;background:#fff!important;border:1px solid #e0d6da!important;border-radius:11px!important;padding:11px 12px!important;min-height:44px!important;font:500 13px Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important;color:#32252b!important}
#rbForm input:focus,#rbForm select:focus{outline:3px solid rgba(120,29,59,.13);border-color:#a14b66!important}
.rb-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.rb-form-tip{font-size:12px;color:#82727a;background:#faf6f7;border-radius:10px;padding:12px;line-height:1.5}
.rb-form-error{color:#a02e4b;font-size:12px;margin:0;line-height:1.5}
.rb-form-error:empty{display:none}
.rb-form-buttons{display:flex;gap:9px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.rb-form-buttons .rb-danger{margin-right:auto}
@media(max-width:1200px){.rb-week-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:760px){.rb-hero,.rb-week-header,.rb-history-header{padding:17px;flex-direction:column;align-items:stretch}.rb-week-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.rb-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.rb-stats>div{padding:12px}.rb-stats strong{font-size:20px}.rb-history-row{grid-template-columns:1fr;gap:10px;padding:15px}.rb-past-pill{justify-self:start}.rb-tabs{width:100%}.rb-tabs button{flex:1}}
@media(max-width:480px){.rb-week-grid{grid-template-columns:1fr}.rb-day{min-height:100px}.rb-day-content{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}.rb-day-title{display:flex;justify-content:space-between;align-items:center}.rb-day-title b{font-size:17px}.rb-stats{grid-template-columns:1fr 1fr}.rb-stats>div:last-child{display:none}.rb-form-grid{grid-template-columns:1fr}.rb-modal{padding:22px 18px}.rb-hero-buttons .rb-button{flex:1}.rb-form-buttons .rb-button{flex:1}}
@media(prefers-reduced-motion:reduce){.rb-button{transition:none!important}}


/* V99 — Admin-defined slot editor and booking slot picker */
.rb-slot-settings{border:1px solid #eee5e9;border-radius:17px;background:#fff;padding:clamp(14px,2vw,24px)}
.rb-slot-intro{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:20px}
.rb-slot-intro h3{font-size:21px;font-weight:850;color:#392430;letter-spacing:-.02em;margin:5px 0 7px}
.rb-slot-intro p{max-width:670px;color:#756b71;font-size:13px;line-height:1.65;margin:0}
.rb-slot-heading,.rb-slot-row{display:grid;grid-template-columns:minmax(150px,2fr) minmax(115px,1fr) minmax(115px,1fr) auto;gap:12px;align-items:center}
.rb-slot-heading{padding:10px 12px;color:#77656e;font-size:11px;font-weight:850;letter-spacing:.025em;border-bottom:1px solid #eee6e9}
.rb-slot-rows{display:grid;gap:9px;margin:12px 0 14px}
.rb-slot-row{padding:10px 12px;border:1px solid #ece4e8;border-radius:12px;background:linear-gradient(120deg,#fff,#fdf9fa)}
.rb-slot-row input{width:100%!important;max-width:100%;min-width:0;min-height:41px!important;border:1px solid #ded5d9!important;border-radius:9px!important;padding:9px 10px!important;background:#fff!important;color:#32252b!important;font:600 13px Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif!important}
.rb-slot-row input:focus{outline:3px solid rgba(120,29,59,.12);border-color:#a14b66!important}
.rb-slot-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-top:18px;border-top:1px solid #eee6e9}
.rb-slot-footer span{max-width:680px;color:#82777e;font-size:12px;line-height:1.65}
.rb-slot-footer button{flex:none}
.rb-slot-preview{padding:12px 14px;border:1px solid #e9d4dd;border-radius:12px;background:#fcf3f6;color:#812747;font-size:13px;font-weight:800}
.rb-slot-preview.rb-preview-error{color:#a02e4b;background:#fff5f6;border-color:#f0c9d4}
@media(max-width:820px){
  .rb-slot-intro{flex-direction:column;align-items:stretch}
  .rb-slot-heading{display:none}
  .rb-slot-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .rb-slot-row [data-slot-field="label"]{grid-column:1/-1}
  .rb-slot-row [data-action="slot-delete"]{justify-self:end}
  .rb-slot-footer{flex-direction:column;align-items:stretch}
}
@media(max-width:420px){.rb-slot-row{gap:7px;padding:9px}.rb-slot-footer .rb-button{width:100%}}


/* V100 — Searchable multiselect like a compact choices dropdown */
.rb-slot-top-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.rb-slot-widget{position:relative;display:grid;gap:9px}
.rb-field-label{display:block;color:#54454e;font-size:12px;font-weight:800}
.rb-multi-toggle{display:flex!important;align-items:center!important;justify-content:space-between!important;width:100%!important;min-height:47px!important;padding:12px 15px!important;background:#f9fafb!important;color:#3e4147!important;border:1px solid #d5dce2!important;border-radius:12px!important;font-size:14px!important;font-weight:700!important;cursor:pointer!important;box-shadow:none!important}
.rb-multi-toggle:hover{border-color:#bd8da0!important;background:#fff!important}
.rb-multi-toggle[aria-expanded="true"]{border-color:#a84769!important;box-shadow:0 0 0 3px rgba(120,29,59,.11)!important}
.rb-multi-toggle>span:last-child{font-size:16px;color:#70676b}
.rb-slot-chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center;min-height:16px}
.rb-selected-chip{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:5px 8px 5px 11px;background:#fbeff4;color:#792445;border:1px solid #efd7e0;border-radius:999px;font-size:12px;font-weight:750;overflow-wrap:anywhere}
.rb-selected-chip button{background:transparent;border:0;padding:0 2px;margin:0;min-height:20px;font-size:16px;line-height:1;color:#9d5170;cursor:pointer}
.rb-placeholder{font-size:12px;color:#a19aa0}
.rb-slot-dropdown{position:relative;z-index:15;padding:10px;background:#fff;border:1px solid #e3d9de;border-radius:13px;box-shadow:0 12px 35px rgba(39,20,29,.10)}
.rb-slot-dropdown[hidden]{display:none!important}
#rbSlotSearch{width:100%!important;min-height:41px!important;margin:0 0 7px!important;padding:9px 12px!important;border:1px solid #cbd7e4!important;border-radius:8px!important;background:#fff!important}
#rbSlotSearch:focus{border-color:#6aa3f0!important;outline:3px solid rgba(87,155,244,.28)!important}
.rb-slot-options{max-height:245px;overflow:auto;overscroll-behavior:contain;display:grid;gap:2px}
.rb-slot-option{display:flex!important;align-items:center!important;gap:10px!important;padding:10px 12px!important;border-radius:8px!important;cursor:pointer!important;font-size:14px!important;font-weight:550!important;color:#30333a!important}
.rb-slot-option:hover,.rb-slot-option:focus-within{background:#f7eff2!important}
.rb-slot-option input[type="checkbox"]{appearance:auto!important;-webkit-appearance:checkbox!important;min-width:16px!important;max-width:16px!important;width:16px!important;height:16px!important;min-height:16px!important;margin:0!important;accent-color:#781d3b!important}
.rb-slot-option span{font-size:14px;line-height:1.4;font-weight:550}
.rb-slot-no-results{padding:12px;font-size:13px;color:#847880}
#rbSlotChips .rb-selected-chip{min-height:27px}
.rb-slot-preview{overflow-wrap:anywhere}
@media(max-width:540px){.rb-slot-top-actions .rb-button{flex:1}.rb-slot-dropdown{padding:7px}.rb-slot-option{padding:11px 9px!important}}


/* V102: Explicit week selection in the schedule toolbar */
#roomBookingRoot .rb-week-pick{
  display:flex;flex-direction:column;gap:4px;min-width:178px;
  color:#6a5360;font-size:11px;font-weight:800;line-height:1.2
}
#roomBookingRoot .rb-week-pick input[type="date"]{
  display:block;width:100%;min-height:42px;
  border:1px solid #ddcbd2;border-radius:11px;padding:7px 11px;
  background:#fff;color:#512e40;font-family:inherit;font-size:13px;font-weight:700;
  box-shadow:none
}
#roomBookingRoot .rb-week-pick input[type="date"]:focus-visible{
  outline:3px solid rgba(120,29,59,.15);border-color:#a45777
}
#roomBookingRoot .rb-pager{align-items:flex-end}
@media(max-width:760px){
  #roomBookingRoot .rb-week-pick{flex:1;min-width:170px}
  #roomBookingRoot .rb-pager{gap:8px}
}


#roomBookingRoot #rbBookingType{background:#fff;border:1px solid #d9dfe2;border-radius:9px;padding:10px 12px;width:100%;min-height:42px}
#roomBookingRoot .rb-item:has(.rb-vacant-label){background:#f5faf6;border-color:#d2e9d9}
#roomBookingRoot .rb-vacant-label{color:#227346;font-weight:780}
.rb-week-entry .rb-week-purpose-label[hidden],.rb-week-entry .rb-week-event-label[hidden],#rbModal [hidden]{display:none!important}
