/* ==========================================================
   FIXFLEET WORKSHOP PLANNER
========================================================== */

.ff-wp-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  margin-bottom:18px;
}

.ff-wp-head h1{
  margin:4px 0 6px;
}

.ff-wp-summary{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
  margin-bottom:16px;
}

.ff-wp-stat{
  padding:14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.075);
  background:rgba(255,255,255,.03);
}

.ff-wp-stat-label{
  font-size:10px;
  font-weight:900;
  letter-spacing:.6px;
  text-transform:uppercase;
  opacity:.62;
}

.ff-wp-stat-value{
  margin-top:5px;
  font-size:24px;
  font-weight:950;
}

.ff-wp-toolbar{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:16px;
}

.ff-wp-range-title{
  flex:1;
  min-width:220px;
  text-align:center;
  font-size:18px;
  font-weight:900;
}

.ff-wp-toggle{
  display:flex;
  gap:4px;
  padding:4px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
}

.ff-wp-toggle button{
  border:0;
  border-radius:8px;
  padding:8px 14px;
  background:transparent;
  color:inherit;
  cursor:pointer;
  font-weight:900;
}

.ff-wp-toggle button.active{
  background:rgba(84,200,255,.15);
}

.ff-wp-clashes{
  margin-bottom:14px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(255,175,45,.3);
  background:rgba(255,175,45,.07);
}

.ff-wp-week{
  display:grid;
  grid-template-columns:repeat(7,minmax(170px,1fr));
  gap:8px;
  overflow-x:auto;
  padding-bottom:8px;
}

.ff-wp-day{
  min-width:170px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:14px;
  overflow:hidden;
  background:rgba(255,255,255,.015);
}

.ff-wp-day.today{
  border-color:rgba(84,200,255,.42);
}

.ff-wp-day-head{
  padding:11px;
  border-bottom:1px solid rgba(255,255,255,.07);
}

.ff-wp-day-name{
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  opacity:.6;
}

.ff-wp-day-date{
  margin-top:3px;
  font-size:17px;
  font-weight:950;
}

.ff-wp-day-body{
  min-height:210px;
  padding:8px;
}

.ff-wp-booking{
  margin-bottom:7px;
  padding:9px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.085);
  background:rgba(255,255,255,.035);
}

.ff-wp-booking.clash{
  border-color:rgba(255,85,85,.6);
  background:rgba(255,85,85,.065);
}

.ff-wp-reg{
  font-size:13px;
  font-weight:950;
}

.ff-wp-title{
  margin-top:3px;
  font-size:12px;
}

.ff-wp-meta{
  margin-top:5px;
  font-size:10px;
  line-height:1.5;
  opacity:.68;
}

.ff-wp-status{
  display:inline-block;
  margin-top:6px;
  padding:3px 6px;
  border-radius:6px;
  font-size:9px;
  font-weight:900;
  text-transform:uppercase;
  background:rgba(84,200,255,.12);
}

.ff-wp-lanes{
  display:grid;
  gap:11px;
}

.ff-wp-lane{
  overflow:hidden;
  border:1px solid rgba(255,255,255,.075);
  border-radius:14px;
}

.ff-wp-lane-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:11px 13px;
  background:rgba(255,255,255,.03);
  border-bottom:1px solid rgba(255,255,255,.06);
}

.ff-wp-lane-name{
  font-weight:950;
}

.ff-wp-lane-type{
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  opacity:.55;
}

.ff-wp-lane-body{
  min-height:60px;
  padding:9px;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(225px,1fr));
  gap:8px;
}

.ff-wp-unscheduled{
  margin-top:18px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.075);
  border-radius:14px;
}

.ff-wp-unscheduled-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:13px;
  background:rgba(255,255,255,.03);
}

.ff-wp-unscheduled-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(250px,1fr));
  gap:9px;
  padding:10px;
}

.ff-wp-repair{
  padding:12px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:11px;
}

.ff-wp-repair-reg{
  font-weight:950;
}

.ff-wp-repair-desc{
  margin-top:5px;
  font-size:12px;
  line-height:1.45;
  opacity:.7;
}

.ff-wp-empty{
  padding:10px;
  font-size:12px;
  opacity:.55;
}

@media(max-width:900px){

  .ff-wp-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

}

@media(max-width:600px){

  .ff-wp-head{
    display:block;
  }

  .ff-wp-range-title{
    width:100%;
    order:-1;
  }

}


/* ==========================================================
   WORKSHOP BOOKING CONTROLS
========================================================== */

.ff-wp-repair-actions{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  margin-top:11px;
}

.ff-wp-booking{
  cursor:pointer;
}

.ff-wp-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:10080;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(0,0,0,.68);
}

.ff-wp-modal{
  width:min(620px,100%);
  max-height:90vh;
  overflow:auto;
  box-sizing:border-box;
  padding:20px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background:#10151d;
  box-shadow:0 24px 90px rgba(0,0,0,.5);
}

.ff-wp-modal h2{
  margin:0 0 5px;
}

.ff-wp-modal-sub{
  margin-bottom:17px;
  opacity:.66;
}

.ff-wp-form{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.ff-wp-field{
  display:grid;
  gap:5px;
}

.ff-wp-field.full{
  grid-column:1 / -1;
}

.ff-wp-field label{
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
  opacity:.65;
}

.ff-wp-field input,
.ff-wp-field select,
.ff-wp-field textarea{
  width:100%;
  box-sizing:border-box;
  padding:10px 11px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.11);
  background:rgba(255,255,255,.045);
  color:inherit;
}

.ff-wp-field textarea{
  min-height:78px;
  resize:vertical;
}

.ff-wp-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  margin-top:18px;
}

.ff-wp-modal-message{
  margin-top:12px;
}

@media(max-width:600px){

  .ff-wp-form{
    grid-template-columns:1fr;
  }

  .ff-wp-field.full{
    grid-column:auto;
  }

}



/* FIXFLEET MOBILE MODAL POLISH */

.ff-wp-modal{
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}

@supports (height:100dvh){

  .ff-wp-modal{
    max-height:
      calc(
        100dvh
        - 24px
        - env(safe-area-inset-top)
        - env(safe-area-inset-bottom)
      );
  }

}

@media(max-width:600px){

  .ff-wp-modal-backdrop{
    align-items:flex-start;

    padding:
      max(12px,env(safe-area-inset-top))
      max(12px,env(safe-area-inset-right))
      max(12px,env(safe-area-inset-bottom))
      max(12px,env(safe-area-inset-left));
  }

  .ff-wp-modal{
    width:100%;
    padding:16px;
    border-radius:16px;
  }

}


/* ==========================================================
   FIXFLEET_WORKSHOP_DESKTOP_FIT_20260923
   Fit Workshop Planner inside the master sidebar workspace.
   ========================================================== */

#adminWorkshopHub,
#fixFleetWorkshopPlannerContent{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
  overflow-x:hidden !important;
}

#fixFleetWorkshopPlannerContent .ff-wp-head,
#fixFleetWorkshopPlannerContent .ff-wp-summary,
#fixFleetWorkshopPlannerContent .ff-wp-toolbar,
#fixFleetWorkshopPlannerContent .ff-wp-week,
#fixFleetWorkshopPlannerContent .ff-wp-lanes,
#fixFleetWorkshopPlannerContent .ff-wp-unscheduled{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  box-sizing:border-box !important;
}

/*
  Seven days share the AVAILABLE width.
  No forced 170px minimum per day.
*/
#fixFleetWorkshopPlannerContent .ff-wp-week{
  grid-template-columns:
    repeat(7,minmax(0,1fr)) !important;

  overflow-x:hidden !important;
}

#fixFleetWorkshopPlannerContent .ff-wp-day{
  min-width:0 !important;
  width:auto !important;
}

#fixFleetWorkshopPlannerContent .ff-wp-day-head{
  min-width:0 !important;
  padding:9px 7px !important;
}

#fixFleetWorkshopPlannerContent .ff-wp-day-body{
  min-width:0 !important;
  padding:6px !important;
}

#fixFleetWorkshopPlannerContent .ff-wp-booking{
  min-width:0 !important;
  overflow:hidden !important;
}

#fixFleetWorkshopPlannerContent .ff-wp-reg,
#fixFleetWorkshopPlannerContent .ff-wp-title,
#fixFleetWorkshopPlannerContent .ff-wp-meta{
  overflow-wrap:anywhere !important;
  word-break:break-word !important;
}

#fixFleetWorkshopPlannerContent .ff-wp-summary{
  grid-template-columns:
    repeat(5,minmax(0,1fr)) !important;
}

#fixFleetWorkshopPlannerContent .ff-wp-stat{
  min-width:0 !important;
}

#fixFleetWorkshopPlannerContent .ff-wp-toolbar{
  min-width:0 !important;
}

#fixFleetWorkshopPlannerContent .ff-wp-range-title{
  min-width:160px !important;
}

/*
  Slightly tighter desktop layout on MacBook-sized screens.
*/
@media(min-width:901px) and (max-width:1300px){

  #fixFleetWorkshopPlannerContent .ff-wp-summary{
    grid-template-columns:
      repeat(5,minmax(0,1fr)) !important;
  }

  #fixFleetWorkshopPlannerContent .ff-wp-stat{
    padding:11px 9px !important;
  }

  #fixFleetWorkshopPlannerContent .ff-wp-stat-value{
    font-size:21px !important;
  }

  #fixFleetWorkshopPlannerContent .ff-wp-day-name{
    font-size:9px !important;
  }

  #fixFleetWorkshopPlannerContent .ff-wp-day-date{
    font-size:15px !important;
  }
}

