/* ============================================================
   Bid2Stay Release 12.8.3.8
   Room Inventory Form UI/UX Cleanup
   ============================================================ */

body[data-room-inventory-release="12.8.3.8"] .main{
  overflow-x:hidden;
}

.b2s-room-page{
  width:100%;
  max-width:100%;
}

.b2s-room-page .page-head{
  align-items:flex-start;
  gap:24px;
}

.b2s-room-page .page-head > div{
  min-width:0;
}

.b2s-room-page .page-head h1{
  margin-bottom:8px;
}

.b2s-room-page .page-head p{
  max-width:720px;
}

#b2sAddRoomTypeButton{
  flex:0 0 auto;
  min-width:150px;
}

/* Loading and summary panel */

.b2s-room-loading{
  min-height:170px;
  border:1px dashed #cad4e0;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
  background:#fbfcfe;
  text-align:center;
}

.b2s-room-loading[hidden]{
  display:none!important;
}

.b2s-room-loading h3{
  margin:0;
  color:#151b26;
  font-size:20px;
}

.b2s-room-loading p{
  margin:8px 0 0;
  color:#7b8797;
}

.b2s-room-summary{
  margin:20px 0 0;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}

.b2s-room-summary-card{
  min-width:0;
  padding:17px 18px;
  border:1px solid #dde4ec;
  border-radius:12px;
  background:#fff;
}

.b2s-room-summary-card span{
  display:block;
  color:#7b8797;
  font-size:11px;
  font-weight:900;
  letter-spacing:.11em;
  text-transform:uppercase;
}

.b2s-room-summary-card strong{
  display:block;
  margin-top:6px;
  color:#111827;
  font-size:25px;
  line-height:1;
}

/* Form card */

.b2s-room-form-card{
  margin-top:24px;
  padding:26px;
  border:1px solid rgba(245,173,22,.42);
  border-radius:16px;
  background:#fff;
  box-shadow:0 14px 34px rgba(14,30,52,.06);
  scroll-margin-top:96px;
}

.b2s-room-form-head{
  margin-bottom:22px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:22px;
}

.b2s-room-form-head > div{
  min-width:0;
}

.b2s-room-form-head .kicker{
  margin-bottom:7px;
}

.b2s-room-form-head h2{
  margin:0;
  color:#151b26;
  font-size:25px;
  line-height:1.15;
}

.b2s-room-form-head p{
  max-width:720px;
  margin:8px 0 0;
  color:#6f7a89;
  font-size:14px;
  line-height:1.55;
}

.b2s-room-form-status{
  margin:0 0 18px;
  padding:0;
  border-radius:10px;
  font-size:13px;
  font-weight:800;
  line-height:1.45;
}

.b2s-room-form-status:not(:empty){
  padding:12px 14px;
  border:1px solid #f2d38c;
  background:#fff8e7;
  color:#8a5a00;
}

.b2s-room-form-status[data-state="success"]:not(:empty){
  border-color:#b8e2ca;
  background:#effbf4;
  color:#166534;
}

.b2s-room-form-status[data-state="error"]:not(:empty){
  border-color:#fecaca;
  background:#fff1f2;
  color:#b42318;
}

.b2s-room-form{
  width:100%;
}

.b2s-room-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:17px;
}

.b2s-room-field{
  min-width:0;
}

.b2s-room-field.full{
  grid-column:1 / -1;
}

.b2s-room-field label{
  display:block;
  margin:0 0 7px;
  color:#253044;
  font-size:11px;
  font-weight:900;
  letter-spacing:.10em;
  text-transform:uppercase;
}

.b2s-room-field label .required{
  color:#b42318;
}

.b2s-room-field input,
.b2s-room-field textarea,
.b2s-room-field select{
  width:100%;
  min-height:50px;
  padding:0 14px;
  border:1px solid #cfd7e2;
  border-radius:9px;
  outline:0;
  background:#fff;
  color:#111827;
  -webkit-text-fill-color:#111827;
  caret-color:#111827;
  font:inherit;
  opacity:1;
  transition:border-color .18s ease,box-shadow .18s ease;
}

.b2s-room-field textarea{
  min-height:104px;
  padding:13px 14px;
  resize:vertical;
}

.b2s-room-field input::placeholder,
.b2s-room-field textarea::placeholder{
  color:#8a96a6;
  -webkit-text-fill-color:#8a96a6;
  opacity:1;
}

.b2s-room-field input:focus,
.b2s-room-field textarea:focus,
.b2s-room-field select:focus{
  border-color:#f5ad16;
  box-shadow:0 0 0 3px rgba(245,173,22,.15);
}

.b2s-room-field small{
  display:block;
  margin-top:6px;
  color:#7b8797;
  font-size:11px;
  line-height:1.45;
}

/* Checkbox repair: never inherit full-width text input rules. */

.b2s-room-toggle-row{
  grid-column:1 / -1;
  min-height:54px;
  padding:13px 15px;
  border:1px solid #dde4ec;
  border-radius:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  background:#f8fafc;
}

.b2s-room-toggle-copy{
  min-width:0;
}

.b2s-room-toggle-copy strong{
  display:block;
  color:#1f2937;
  font-size:13px;
}

.b2s-room-toggle-copy span{
  display:block;
  margin-top:3px;
  color:#788596;
  font-size:11px;
  line-height:1.4;
}

.b2s-room-switch{
  position:relative;
  width:48px;
  height:27px;
  flex:0 0 48px;
}

.b2s-room-switch input[type="checkbox"]{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  min-width:1px!important;
  min-height:1px!important;
  max-width:1px!important;
  margin:0!important;
  padding:0!important;
  opacity:0!important;
  pointer-events:none;
}

.b2s-room-switch span{
  position:absolute;
  inset:0;
  border-radius:99px;
  background:#cbd5e1;
  cursor:pointer;
  transition:background .18s ease;
}

.b2s-room-switch span::after{
  content:"";
  position:absolute;
  top:3px;
  left:3px;
  width:21px;
  height:21px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 5px rgba(0,0,0,.20);
  transition:transform .18s ease;
}

.b2s-room-switch input:checked + span{
  background:#f5ad16;
}

.b2s-room-switch input:checked + span::after{
  transform:translateX(21px);
}

.b2s-room-switch input:focus-visible + span{
  outline:3px solid rgba(245,173,22,.26);
  outline-offset:2px;
}

/* Actions */

.b2s-room-form-actions{
  grid-column:1 / -1;
  margin-top:2px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}

.b2s-room-form-actions button{
  min-width:145px;
  min-height:48px;
  padding:11px 18px;
  border-radius:9px;
  font-size:13px;
  font-weight:900;
}

#b2sSaveRoomType{
  border:1px solid #e69b00;
  background:linear-gradient(180deg,#ffc947,#f5ad16);
  color:#08111d;
}

#b2sCancelRoomEdit{
  border:1px solid #cfd7e2;
  background:#fff;
  color:#253044;
}

/* Inventory list */

.b2s-room-list-section{
  margin-top:26px;
}

.b2s-room-list-heading{
  margin-bottom:14px;
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:18px;
}

.b2s-room-list-heading h2{
  margin:0;
  color:#151b26;
  font-size:23px;
}

.b2s-room-list-heading p{
  margin:5px 0 0;
  color:#7b8797;
  font-size:13px;
}

#b2sLiveRoomList{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:0!important;
}

.b2s-live-room-card{
  min-width:0;
  padding:18px!important;
  border:1px solid #dde4ec!important;
  border-radius:13px!important;
  background:#fff!important;
  box-shadow:0 8px 24px rgba(14,30,52,.04);
}

.b2s-live-room-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.b2s-live-room-card h3{
  margin:0;
  color:#151b26;
  font-size:18px;
}

.b2s-room-status-badge{
  flex:0 0 auto;
  padding:5px 8px;
  border-radius:99px;
  background:#effbf4;
  color:#166534;
  font-size:10px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.b2s-room-status-badge.inactive{
  background:#f2f4f7;
  color:#667085;
}

.b2s-live-room-description{
  margin:9px 0 0;
  color:#667085;
  font-size:13px;
  line-height:1.55;
}

.b2s-live-room-stats{
  margin-top:15px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.b2s-live-room-stat{
  min-width:0;
  padding:10px 11px;
  border-radius:9px;
  background:#f7f9fb;
}

.b2s-live-room-stat span{
  display:block;
  color:#7b8797;
  font-size:9px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.b2s-live-room-stat strong{
  display:block;
  margin-top:4px;
  color:#1f2937;
  font-size:13px;
  overflow-wrap:anywhere;
}

.b2s-live-room-actions{
  margin-top:15px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.b2s-live-room-actions button{
  min-height:40px;
  padding:8px 13px;
  border-radius:8px;
  font-size:12px;
  font-weight:850;
}

.b2s-live-room-actions [data-edit-room]{
  border:1px solid #e1a51c;
  background:#fff7df;
  color:#765000;
}

.b2s-live-room-actions [data-delete-room]{
  border:1px solid #fecaca;
  background:#fff5f5;
  color:#b42318;
}

.b2s-room-empty-state{
  grid-column:1 / -1;
  padding:26px;
  border:1px dashed #cbd5e1;
  border-radius:12px;
  background:#fbfcfe;
  color:#667085;
  text-align:center;
}

/* Availability calendar */

.b2s-availability-card{
  margin-top:28px!important;
  padding:24px!important;
  border:1px solid rgba(245,173,22,.38)!important;
  border-radius:15px!important;
  background:#fff!important;
}

.b2s-availability-card h2{
  margin:0;
  color:#151b26;
  font-size:23px;
}

.b2s-availability-card > p{
  margin:7px 0 0;
  color:#6f7a89;
  font-size:13px;
}

#b2sAvailabilityControls{
  margin-top:20px;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:14px!important;
}

#b2sAvailabilityControls > div{
  min-width:0;
}

#b2sAvailabilityControls label{
  display:block;
  margin-bottom:7px;
  color:#253044;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

#b2sAvailabilityControls input,
#b2sAvailabilityControls select{
  min-height:48px;
  padding:0 12px;
  border:1px solid #cfd7e2;
  border-radius:9px;
  background:#fff;
  color:#111827;
}

#b2sAvailabilityControls button{
  width:100%;
  min-height:48px;
  padding:10px 13px;
  border:1px solid #d5dce5;
  border-radius:9px;
  background:#f8fafc;
  color:#253044;
  font-size:12px;
  font-weight:850;
}

/* Responsive */

@media(max-width:980px){
  #b2sLiveRoomList{
    grid-template-columns:1fr;
  }

  #b2sAvailabilityControls{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media(max-width:720px){
  .b2s-room-page .page-head{
    align-items:stretch;
    flex-direction:column;
  }

  #b2sAddRoomTypeButton{
    width:100%;
  }

  .b2s-room-summary{
    grid-template-columns:1fr;
  }

  .b2s-room-form-card{
    padding:20px 16px;
  }

  .b2s-room-form-grid{
    grid-template-columns:1fr;
  }

  .b2s-room-field.full,
  .b2s-room-toggle-row,
  .b2s-room-form-actions{
    grid-column:auto;
  }

  .b2s-room-form-actions button{
    width:100%;
  }

  .b2s-room-list-heading{
    align-items:flex-start;
    flex-direction:column;
  }

  .b2s-live-room-stats{
    grid-template-columns:1fr;
  }

  #b2sAvailabilityControls{
    grid-template-columns:1fr!important;
  }

  .b2s-availability-card{
    padding:20px 16px!important;
  }
}
