
/* E404_PUBLIC_OPS_SCHEDULE_V1 */

#ops-schedule .ops-schedule-panel{
  background:#152336;
  color:#e5edf6;
  border:1px solid #40516a;
  padding:18px;
}

#ops-schedule .ops-schedule-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-bottom:15px;
}

#ops-schedule .ops-schedule-toolbar button,
#ops-schedule .ops-schedule-toolbar select{
  background:#273d55;
  color:#fff;
  border:1px solid #60758b;
  border-radius:7px;
  padding:10px;
  cursor:pointer;
}

#opsWeekLabel{
  color:#fff;
  font-size:14px;
}

#ops-schedule .ops-schedule-legend{
  display:flex;
  flex-wrap:wrap;
  gap:10px 17px;
  margin:14px 0;
  font-size:12px;
}

#ops-schedule .ops-schedule-legend span{
  display:inline-flex;
  gap:7px;
  align-items:center;
}

#ops-schedule .ops-schedule-legend i{
  display:inline-block;
  width:12px;
  height:12px;
  border-radius:3px;
}

#ops-schedule .ops-calendar-scroll{
  overflow-x:auto;
  border:1px solid #40516a;
  border-radius:9px;
}

#ops-schedule .ops-calendar-grid{
  display:grid;
  grid-template-columns:repeat(7,minmax(155px,1fr));
  min-width:1085px;
  background:#101b2b;
}

#ops-schedule .ops-calendar-column{
  min-width:0;
  border-right:1px solid #34465b;
}

#ops-schedule .ops-calendar-day-heading{
  text-align:center;
  background:#21334b;
  border-bottom:2px solid #dc3545;
  padding:12px 4px;
  color:#fff;
  font-size:12px;
  font-weight:700;
}

#ops-schedule .ops-calendar-day-body{
  position:relative;
  height:552px;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 22px,
      #405167 23px
    );
}

#ops-schedule .ops-calendar-flight{
  position:absolute;
  box-sizing:border-box;
  color:#fff;
  border:1px solid #d0d9e5;
  border-radius:5px;
  padding:5px;
  text-align:left;
  overflow:hidden;
  overflow-wrap:anywhere;
  white-space:pre-line;
  font-size:11px;
  line-height:1.3;
  cursor:pointer;
  min-height:0;
}

#ops-schedule .ops-calendar-flight:hover{
  filter:brightness(1.2);
  z-index:5;
}

#ops-schedule .ops-calendar-flight:focus-visible{
  outline:3px solid #fff;
  z-index:6;
}

#ops-schedule .ops-schedule-details{
  background:#202d3b;
  border:1px solid #596a7c;
  border-top:3px solid #dc3545;
  border-radius:9px;
  padding:18px;
  margin-top:18px;
}

#ops-schedule .ops-status-badge{
  display:inline-block;
  color:#fff;
  padding:7px 12px;
  border-radius:6px;
  margin:6px 0;
}

#ops-schedule .ops-schedule-footnote{
  color:#adbfce;
  font-size:12px;
  margin-top:14px;
}


/* E404_OPS_SCHEDULE_V19 */
#ops-schedule .ops-v19-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
  margin-bottom:15px;
}

#ops-schedule .ops-v19-heading h3{
  margin:5px 0;
  color:#fff;
  font-size:21px;
}

#ops-schedule .ops-v19-heading small{
  color:#adc1d6;
  font-size:11px;
  letter-spacing:.07em;
}

#ops-schedule .ops-v19-route{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  gap:12px;
  align-items:center;
  padding:18px 12px;
  background:#182535;
  border:1px solid #43546a;
  border-radius:9px;
  margin:14px 0 18px;
  text-align:center;
}

#ops-schedule .ops-v19-route strong{
  display:block;
  color:#fff;
  font-size:clamp(18px,3vw,26px);
}

#ops-schedule .ops-v19-route small{
  display:block;
  margin-top:5px;
  color:#adbfce;
  font-size:12px;
}

#ops-schedule .ops-v19-arrow{
  font-size:26px;
  color:#f87171;
  font-weight:700;
}

#ops-schedule .ops-v19-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}

#ops-schedule .ops-v19-field{
  padding:13px;
  background:#192839;
  border:1px solid #3b4e65;
  border-radius:8px;
  min-width:0;
}

#ops-schedule .ops-v19-field span{
  display:block;
  color:#aec1d5;
  font-size:12px;
  margin-bottom:6px;
}

#ops-schedule .ops-v19-field strong{
  display:block;
  color:#fff;
  font-size:14px;
  overflow-wrap:anywhere;
}

#ops-schedule .ops-v19-footer{
  margin-top:16px;
  color:#b8c8d8;
  font-size:13px;
}

#ops-schedule .ops-v19-link{
  display:inline-block;
  padding:11px 15px;
  background:#24577c;
  border:1px solid #588bb0;
  color:#fff!important;
  border-radius:7px;
  font-weight:700;
  text-decoration:none!important;
}

#ops-schedule .ops-v19-link:hover{
  background:#326e98;
}

@media(max-width:540px){
  #ops-schedule .ops-v19-grid{
    grid-template-columns:1fr;
  }
  #ops-schedule .ops-v19-route{
    gap:6px;
    padding:12px 6px;
  }
}

/* E404_OPS_ROUTE_ARROW_V20 */
#ops-schedule .ops-v19-arrow {
  font-size: 64px;
  line-height: 1;
  font-weight: 900;
  color: #DC3545;
  text-shadow: 0 2px 10px rgba(220,53,69,.35);
}

@media (max-width: 540px) {
  #ops-schedule .ops-v19-arrow {
    font-size: 44px;
  }
}


/* E404_OPS_FLAGS_V21 */
#ops-schedule .ops-v21-flag {
  display:block;
  width:40px;
  height:30px;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.35);
  border-radius:3px;
  margin:0 auto 9px;
  box-shadow:0 3px 9px rgba(0,0,0,.3);
}

#ops-schedule .ops-v21-flag-fallback {
  display:block;
  font-size:31px;
  line-height:1.2;
  margin-bottom:8px;
  text-align:center;
}

#ops-schedule .ops-v19-arrow {
  font-size:70px;
  font-weight:900;
  line-height:1;
  color:#DC3545;
  text-shadow:0 3px 12px rgba(220,53,69,.5);
}

@media(max-width:540px){
  #ops-schedule .ops-v19-arrow {
    font-size:46px;
  }
  #ops-schedule .ops-v21-flag {
    width:32px;
    height:24px;
  }
}


/* E404_PUBLIC_OPS_DISCORD_DISPATCH_V2 */
.e404-ops-discord-panel {
  margin-top:20px;
  padding:20px;
  border:1px solid #b43545;
  border-radius:12px;
  background:linear-gradient(145deg,#171b22,#222831);
  color:#f4f4f5;
}

.e404-ops-discord-panel h3 {
  margin:0 0 15px;
  color:#fff;
  font-size:1.15rem;
}

.e404-ops-dispatch-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:20px;
}

.e404-ops-dispatch-link {
  display:inline-flex;
  justify-content:center;
  align-items:center;
  padding:11px 15px;
  border:1px solid #e34b5b;
  border-radius:8px;
  background:#a52535;
  color:#fff;
  font-weight:700;
  text-decoration:none;
}

.e404-ops-dispatch-link:hover {
  background:#ce3448;
  color:#fff;
}

.e404-ops-dispatch-link.is-disabled {
  opacity:.45;
  cursor:not-allowed;
  pointer-events:none;
}

.e404-ops-discord-notice {
  padding:17px;
  border:1px solid #444c58;
  border-radius:10px;
  background:#111720;
}

.e404-ops-discord-notice h4 {
  margin:0 0 13px;
  color:#f8fafc;
}

.e404-ops-discord-notice p {
  margin:9px 0;
  line-height:1.6;
}

.e404-ops-discord-warning {
  color:#fbbf24;
  font-weight:700;
}

.e404-ops-discord-command {
  display:inline-block;
  margin:12px 0;
  padding:12px 16px;
  border:1px solid #64748b;
  border-radius:8px;
  background:#263141;
  color:#fff;
  font-weight:800;
}

.e404-ops-discord-live {
  color:#4ade80;
  font-weight:800;
}

.e404-ops-discord-note {
  color:#b7c0ce;
  font-size:.9rem;
}

@media(max-width:650px) {
  .e404-ops-discord-panel {
    padding:13px;
  }
  .e404-ops-dispatch-actions {
    flex-direction:column;
  }
  .e404-ops-dispatch-link {
    width:100%;
    box-sizing:border-box;
  }
}


/* E404_CALENDAR_FLIGHT_WRAP_V1
 * Wrap flight information within the existing timed flight cards.
 * Keep the original flight geometry and colour coding intact.
 */
#ops-schedule .ops-calendar-flight {
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  hyphens: auto;
  line-height: 1.35;
  font-size: 10px;
  box-sizing: border-box;

  /* Small time slots cannot always contain every line. */
  overflow-x: hidden;
  overflow-y: auto;

  scrollbar-width: thin;
  scrollbar-color: #8395aa transparent;
}

#ops-schedule .ops-calendar-flight::-webkit-scrollbar {
  width: 4px;
}

#ops-schedule .ops-calendar-flight::-webkit-scrollbar-thumb {
  background: #8395aa;
  border-radius: 4px;
}

/* Make the complete text accessible on keyboard focus. */
#ops-schedule .ops-calendar-flight:focus-visible {
  outline: 3px solid #ffffff;
  z-index: 10;
}


/* E404_DYNAMIC_UTC_TIMELINE_V1
 * Independent UTC ruler and adaptive vertical scale.
 */
#ops-schedule .ops-calendar-grid{
  grid-template-columns:54px repeat(7,minmax(155px,1fr));
  min-width:1139px;
}

#ops-schedule .ops-calendar-time-column{
  min-width:0;
  background:#18283b;
  border-right:1px solid #526783;
}

#ops-schedule .ops-calendar-time-body{
  position:relative;
  background:#101b2b;
}

#ops-schedule .ops-calendar-time-tick{
  position:absolute;
  right:5px;
  transform:translateY(-50%);
  color:#c9d7e7;
  font-size:10px;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
  pointer-events:none;
}

#ops-schedule .ops-calendar-time-tick.first{
  transform:none;
}

#ops-schedule .ops-calendar-time-tick.last{
  transform:translateY(-100%);
}

#ops-schedule .ops-calendar-day-body{
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--e404-hour-px,48px) - 1px),
      #405167 calc(var(--e404-hour-px,48px) - 1px),
      #405167 var(--e404-hour-px,48px)
    );
}

#ops-schedule .ops-calendar-flight{
  scrollbar-width:thin;
}


/* E404_PILOT_INTEREST_UI_V1 */
#ops-schedule .ops-flight-interest-panel {
  margin-top:16px;
  padding:16px;
  background:#172638;
  border:1px solid #52657b;
  border-top:3px solid #dc3545;
  border-radius:8px;
  color:#fff;
}

#ops-schedule .ops-flight-interest-panel h3 {
  margin:0 0 12px;
  font-size:15px;
  color:#fff;
}

#ops-schedule .ops-flight-interest-names ul {
  margin:10px 0 0;
  padding-left:22px;
}

#ops-schedule .ops-flight-interest-names li {
  margin:4px 0;
}

#ops-schedule .ops-flight-interest-count {
  display:inline-block;
  margin-top:4px;
  padding:2px 4px;
  border-radius:4px;
  background:rgba(0,0,0,.27);
  color:#fff;
  font-size:9px;
  line-height:1.2;
  font-weight:700;
}

#ops-schedule .ops-flight-interest-controls {
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  align-items:center;
  margin-top:15px;
  padding-top:13px;
  border-top:1px solid #52657b;
}

#ops-schedule .ops-flight-interest-controls strong,
#ops-schedule .ops-flight-interest-controls p {
  width:100%;
  margin:0;
}

#ops-schedule .ops-flight-interest-controls button {
  background:#263b53;
  color:#fff;
  border:1px solid #71859d;
  border-radius:6px;
  padding:9px 13px;
  cursor:pointer;
  font-weight:700;
}

#ops-schedule .ops-flight-interest-controls button.is-selected {
  background:#16835d;
  border-color:#9be1bc;
}

#ops-schedule .ops-flight-interest-controls button:disabled {
  opacity:.55;
  cursor:not-allowed;
}


/* E404_COMPACT_CALENDAR_V1
   Fixed-size stacked flight cards, original status colours. */

#ops-schedule .e404-compact-grid{
  display:grid;
  grid-template-columns:repeat(
    var(--e404-compact-days,7),minmax(155px,1fr)
  );
  min-width:0;
  align-items:stretch;
}

#ops-schedule .e404-compact-grid .ops-calendar-column{
  min-width:0;
}

#ops-schedule .e404-compact-grid .ops-calendar-day-body{
  position:relative;
  height:auto !important;
  min-height:110px;
  display:flex;
  flex-direction:column;
  gap:7px;
  padding:8px 5px;
  background:#101b2b;
}

#ops-schedule .e404-compact-grid .e404-compact-card{
  position:relative !important;
  display:flex !important;
  flex-direction:column;
  gap:5px;
  width:100% !important;
  height:auto !important;
  min-height:100px;
  left:auto !important;
  top:auto !important;
  padding:9px !important;
  box-sizing:border-box;
  white-space:normal !important;
  overflow:visible !important;
  text-align:left !important;
  border-radius:6px;
  line-height:1.3;
  cursor:pointer;
  color:#fff;
}

#ops-schedule .e404-compact-time{
  font-size:11px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
}

#ops-schedule .e404-compact-route{
  font-size:12px;
  font-weight:600;
  overflow-wrap:anywhere;
}

#ops-schedule .e404-compact-bottom{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:5px;
  font-size:12px;
  font-weight:700;
}

#ops-schedule .e404-compact-aircraft{
  font-size:11px;
}

#ops-schedule .e404-compact-empty{
  display:block;
  text-align:center;
  color:#a6b6c9;
  font-size:11px;
  padding:15px 4px;
}

#ops-schedule .e404-compact-card
.ops-flight-interest-count{
  display:inline-block !important;
  align-self:flex-start;
  margin-top:2px;
  font-size:10px;
}

@media(max-width:900px){
  #ops-schedule .e404-compact-grid{
    min-width:calc(
      var(--e404-compact-days,7) * 158px
    );
  }
}

/* Reserved for verified FBO identifiers, not route guesses. */
#ops-schedule .e404-compact-card.e404-fbo{
  border:3px solid #e3262e !important;
}


/* E404_FBO_LEGEND_V1 */
#ops-schedule .e404-fbo-legend-item{
  display:inline-flex;
  align-items:center;
  gap:7px;
  font-size:inherit;
  font-weight:600;
  white-space:normal;
}
#ops-schedule .e404-fbo-legend-ring{
  display:inline-block;
  flex:0 0 18px;
  width:18px;
  height:18px;
  box-sizing:border-box;
  border:3px solid #e3262e;
  border-radius:4px;
  background:transparent;
}
