/*
 * Shared month-calendar reading rule.
 * Weather is date metadata, while appointment and job blocks receive the space.
 */
.ironflow-calendar-page .calendar-day-heading-v2,
.ironflow-production-calendar-page .calendar-day-heading-v2{
  min-height:27px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:7px;
  min-width:0;
}

.ironflow-calendar-page .calendar-day-heading-v2 :is(.month-date,.calendar-day-weather-strip),
.ironflow-production-calendar-page .calendar-day-heading-v2 :is(.job-month-date,.calendar-day-weather-strip){
  margin:0!important;
}

.ironflow-calendar-page .calendar-day-weather-strip,
.ironflow-production-calendar-page .calendar-day-weather-strip{
  min-width:0;
  display:inline-flex;
  align-items:center;
  gap:4px;
  margin-left:auto!important;
  padding:0 0 0 8px!important;
  border:0!important;
  border-left:1px solid rgba(148,163,184,.32)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#cbd7e3;
  font-size:10.5px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
}

.ironflow-calendar-page .calendar-day-weather-strip i,
.ironflow-production-calendar-page .calendar-day-weather-strip i{
  width:14px!important;
  height:14px!important;
  flex:0 0 14px;
  filter:none!important;
}

.ironflow-calendar-page .calendar-day-weather-strip>span,
.ironflow-production-calendar-page .calendar-day-weather-strip>span{
  overflow:hidden;
  text-overflow:ellipsis;
}

.ironflow-calendar-page .calendar-month-event-shell-v2{
  position:relative;
  min-width:0;
  min-height:48px;
}

.ironflow-calendar-page .calendar-month-event-shell-v2.has-map .calendar-month-event{
  padding-right:34px!important;
}

.ironflow-calendar-page .calendar-event-map-v2{
  position:absolute;
  top:50%;
  right:5px;
  z-index:2;
  width:23px;
  height:23px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#071523;
  box-shadow:none;
  filter:none;
  transform:translateY(-50%);
  cursor:pointer;
}

.ironflow-calendar-page .calendar-event-map-v2{
  border:1px solid #ffae32;
  color:#ffae32;
}

.ironflow-calendar-page .calendar-event-map-v2 svg{
  width:13px;
  height:13px;
}

.ironflow-calendar-page .calendar-event-map-v2:hover,
.ironflow-calendar-page .calendar-event-map-v2:focus-visible{
  border-color:#ff7a00;
  outline:1px solid #ff7a00;
  outline-offset:1px;
  background:#16120d;
  color:#ffae32;
  box-shadow:none;
}

.calendar-appointment-hover{
  pointer-events:auto!important;
}

.calendar-appointment-hover .calendar-hover-heading-v2{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.calendar-appointment-hover .calendar-hover-heading-v2 strong{
  display:block;
  margin-top:6px;
  color:#fff;
  font-size:17px;
  font-weight:800;
  line-height:1.3;
}

.calendar-appointment-hover .calendar-hover-edit-v2{
  min-width:70px;
  min-height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:0 10px;
  border:1px solid #ff7a00;
  border-radius:6px;
  background:#15120f;
  color:#ff9a3d;
  font:800 11px/1 Inter,ui-sans-serif,system-ui,sans-serif;
  box-shadow:none;
  cursor:pointer;
}

.calendar-appointment-hover .calendar-hover-edit-v2 svg{
  width:15px;
  height:15px;
}

.calendar-appointment-hover .calendar-hover-edit-v2:hover,
.calendar-appointment-hover .calendar-hover-edit-v2:focus-visible{
  outline:1px solid #ff7a00;
  outline-offset:2px;
  background:#21170f;
  color:#ffb166;
}

.calendar-appointment-hover .calendar-hover-contact-v2{
  display:flex;
  align-items:flex-start;
  gap:6px;
  margin:-4px;
  padding:4px;
  border:1px solid transparent;
  border-radius:5px;
  color:#eaf2f9;
  text-decoration:none;
  box-shadow:none;
}

.calendar-appointment-hover .calendar-hover-contact-v2 svg{
  width:15px;
  height:15px;
  flex:0 0 15px;
  margin-top:1px;
}

.calendar-appointment-hover .calendar-hover-contact-v2.phone svg{color:#20bfff}
.calendar-appointment-hover .calendar-hover-contact-v2.map svg{color:#ffae32}

.calendar-appointment-hover .calendar-hover-contact-v2:hover,
.calendar-appointment-hover .calendar-hover-contact-v2:focus-visible{
  border-color:#ff7a00;
  outline:0;
  background:#151a1e;
  color:#fff;
}

.ironflow-calendar-page .appointment-detail-contact-v2{
  display:inline-flex;
  align-items:center;
  gap:6px;
  max-width:100%;
  padding:2px 3px;
  border:1px solid transparent;
  border-radius:5px;
  color:#eaf2f9;
  text-decoration:none;
  box-shadow:none;
}

.ironflow-calendar-page .appointment-detail-contact-v2 svg{
  width:15px;
  height:15px;
  flex:0 0 15px;
}

.ironflow-calendar-page .appointment-detail-contact-v2.phone svg{color:#20bfff}
.ironflow-calendar-page .appointment-detail-contact-v2.map svg{color:#ffae32}

.ironflow-calendar-page .appointment-detail-contact-v2:hover,
.ironflow-calendar-page .appointment-detail-contact-v2:focus-visible{
  border-color:#ff7a00;
  outline:0;
  background:#151a1e;
  color:#fff;
}

/* Two complete appointment blocks should be visible before any inner scroll. */
.premium-app .ironflow-calendar-page .month-calendar-grid{
  grid-template-rows:28px repeat(6,154px)!important;
  height:auto!important;
  min-height:952px!important;
}

.premium-app .ironflow-calendar-page .month-day{
  min-height:154px!important;
  overflow:hidden!important;
}

.premium-app .ironflow-calendar-page .month-events{
  height:100px!important;
  max-height:100px!important;
  grid-auto-rows:48px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior-y:contain!important;
  scrollbar-width:thin!important;
  scrollbar-color:#f58216 #0a151f!important;
}

.premium-app .ironflow-calendar-page .month-events::-webkit-scrollbar{
  display:block!important;
  width:4px!important;
  height:4px!important;
}

.premium-app .ironflow-calendar-page .month-events::-webkit-scrollbar-track{
  background:#0a151f!important;
}

.premium-app .ironflow-calendar-page .month-events::-webkit-scrollbar-thumb{
  border-radius:999px!important;
  background:#f58216!important;
}

.ironflow-production-calendar-page .job-month-jobs::-webkit-scrollbar{
  display:none!important;
  width:0!important;
  height:0!important;
}

/* The Jobs production calendar follows the same date/weather and density rule. */
.ironflow-production-calendar-page .job-month-grid{
  grid-template-rows:repeat(6,154px)!important;
}

.ironflow-production-calendar-page .job-month-cell{
  min-height:154px!important;
  align-content:start!important;
}

.ironflow-production-calendar-page .job-month-jobs{
  max-height:107px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  scrollbar-width:none!important;
}

/*
 * Desktop Day view keeps both working columns within the viewport.
 * Each body scrolls independently; headers remain fixed and scrollbars stay invisible.
 */
@media(min-width:1181px){
  .premium-app .ironflow-calendar-page .calendar-shell.calendar-mode-day{
    height:calc(100dvh - 174px)!important;
    min-height:480px!important;
    max-height:calc(100dvh - 174px)!important;
    align-items:stretch!important;
    overflow:hidden!important;
  }

  .premium-app .ironflow-calendar-page .calendar-shell.calendar-mode-day :is(
    .calendar-board-panel,
    .request-queue-panel
  ){
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr)!important;
    align-self:stretch!important;
    overflow:hidden!important;
  }

  .premium-app .ironflow-calendar-page .calendar-shell.calendar-mode-day :is(
    .calendar-board-panel > .body,
    .request-queue-body
  ){
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior-y:contain!important;
    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
  }

  .premium-app .ironflow-calendar-page .calendar-shell.calendar-mode-day .request-queue-body{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
  }

  .premium-app .ironflow-calendar-page .calendar-shell.calendar-mode-day .request-queue-body > *{
    flex:0 0 auto!important;
  }

  .premium-app .ironflow-calendar-page .calendar-shell.calendar-mode-day :is(
    .calendar-board-panel > .body,
    .request-queue-body
  )::-webkit-scrollbar{
    display:none!important;
    width:0!important;
    height:0!important;
  }
}

@media(max-width:760px){
  .ironflow-calendar-page .calendar-day-weather-strip,
  .ironflow-production-calendar-page .calendar-day-weather-strip{
    font-size:9.5px;
  }
}
