/* ── Reset ── */
.am-planner,
.am-planner *{ box-sizing:border-box; font-family:'DM Sans',system-ui,sans-serif; -webkit-font-smoothing:antialiased }

/* ── Card shell ── */
.am-planner{
  background:#fff;
  border:.5px solid #E2E8F0;
  border-radius:10px;
  overflow:hidden;
}

/* ══════════════════════════════════════
   HEADER  #0D1B2A
   ══════════════════════════════════════ */
.amp-header{
  display:flex;
  align-items:center;
  gap:5px;
  padding:7px 10px;
  background:#0D1B2A;
  flex:0 0 auto;
}
.amp-title{
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.09em;
  color:#fff;
  white-space:nowrap;
}
.amp-badge{
  border-radius:999px;
  font-size:8px;
  font-weight:700;
  padding:2px 5px;
  background:rgba(0,196,154,.2);
  color:#00C49A;
}

/* View switcher — three icon buttons */
.amp-vsw{
  display:flex;
  gap:3px;
  margin-left:auto;
  align-items:center;
}
.amp-vsw-btn{
  width:20px;
  height:16px;
  border-radius:3px;
  border:.5px solid rgba(255,255,255,.35);
  background:transparent;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background .12s ease, border-color .12s ease, color .12s ease;
}
.amp-vsw-btn.active{
  background:rgba(0,196,154,.18);
  border-color:rgba(0,196,154,.35);
  color:#00C49A;
}
.amp-vsw-btn svg{ display:block }

/* Clear button */
.amp-clear{
  border:.5px solid rgba(255,255,255,.35);
  color:#fff;
  background:transparent;
  border-radius:4px;
  padding:2px 7px;
  font-size:9px;
  font-weight:600;
  cursor:pointer;
  white-space:nowrap;
  margin-left:3px;
  font-family:'DM Sans',inherit;
}
.amp-clear:hover{ color:#fff }

/* ══════════════════════════════════════
   DATE STRIP  — same bg as header (#0D1B2A)
   ══════════════════════════════════════ */
.amp-date-strip{
  display:grid;
  gap:2px;
  padding:4px 8px 3px;
  background:#0D1B2A;
  border-bottom:.5px solid #1A2E42;
  flex:0 0 auto;
}

.amp-ds-corner{
  font-size:6.5px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#4B6584;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Date box — default */
.amp-dbox{
  background:#1A2E42;
  border-radius:4px;
  padding:2px 4px;
  text-align:center;
}
.amp-dbox .amp-dw{
  font-size:6px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.05em;
  color:#64748B;
  display:block;
}
.amp-dbox .amp-dn{
  font-family:'DM Serif Display',Georgia,serif;
  font-size:13px;
  font-weight:700;
  color:#fff;
  line-height:1.1;
  display:block;
}

/* Date box — today */
.amp-dbox.today{
  background:#0A3D2E;
  border:.5px solid rgba(0,196,154,.3);
}
.amp-dbox.today .amp-dw{ color:#00C49A }
.amp-dbox.today .amp-dn{ color:#fff }

/* ══════════════════════════════════════
   MATRIX BODY
   ══════════════════════════════════════ */
.amp-matrix-wrap{
  padding:4px 8px 5px;
  flex:1;
}
.amp-matrix{
  display:grid;
  gap:2px;
}
.amp-band-lbl{
  font-size:7px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.07em;
  color:#94A3B8;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  padding-top:0;
  line-height:1;
}
.amp-band-icon{
  font-size:8px;
  color:#64748B;
  line-height:1;
}

/* Empty cell */
.amp-empty{
  border-radius:4px;
  background:#F8FAFC;
  min-height:36px;
}

/* ── MEDIUM chip: time + title + venue ── */
.amp-chip{
  border-radius:4px;
  padding:4px 5px;
  background:#E0FAF4;
  border-left:2px solid;
  cursor:pointer;
  transition:box-shadow .12s ease;
  min-width:0;
  overflow:hidden;
}
.amp-chip:hover{ box-shadow:0 2px 8px rgba(13,27,42,.1) }
.amp-chip-time{
  font-size:8px;
  font-weight:700;
  display:block;
  margin-bottom:1px;
  color:#00A880;
}
.amp-chip-title{
  font-size:9px;
  font-weight:700;
  color:#0D1B2A;
  line-height:1.2;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.amp-chip-venue{
  font-size:7.5px;
  color:#94A3B8;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin-top:1px;
}

/* ── SMALL chip: time + title + dot ── */
.amp-chip-sm{
  border-radius:4px;
  padding:3px 5px;
  background:#E0FAF4;
  border-left:2px solid;
  display:flex;
  align-items:center;
  gap:3px;
  cursor:pointer;
  min-height:20px;
  min-width:0;
  overflow:hidden;
}
.amp-chip-sm-time{
  font-size:8.5px;
  font-weight:700;
  color:#00A880;
  white-space:nowrap;
  flex:0 0 auto;
}
.amp-chip-sm-title{
  font-size:8px;
  font-weight:600;
  color:#0D1B2A;
  flex:1;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.amp-chip-sm-dot{
  width:4px;
  height:4px;
  border-radius:50%;
  background:#00C49A;
  flex:0 0 4px;
}
.amp-empty-sm{
  border-radius:4px;
  background:#F8FAFC;
  min-height:20px;
}

/* ── Rank ribbon colours — mirrors event card rb-1..5 ── */
.amp-rank-5{ border-left-color:#0D1B2A }   /* navy   — must      */
.amp-rank-4{ border-left-color:#00A880 }   /* teal   — priority  */
.amp-rank-3{ border-left-color:#3B82F6 }   /* blue   — featured  */
.amp-rank-2{ border-left-color:var(--am-amber,#F5A623) } /* amber — standard */
.amp-rank-1{ border-left-color:#94A3B8 }   /* slate  — notable   */

/* ══════════════════════════════════════
   FOOTER  #071018
   ══════════════════════════════════════ */
.amp-footer{
  display:flex;
  align-items:stretch;
  background:#071018;
  border-top:.5px solid #0D1B2A;
  flex:0 0 auto;
}
.amp-footer-btn{
  flex:1;
  padding:6px 4px;
  text-align:center;
  font-size:8px;
  font-weight:600;
  color:#fff;
  cursor:pointer;
  border-right:.5px solid #0D1B2A;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:1px;
  font-family:'DM Sans',inherit;
  background:transparent;
  border-top:none;
  border-bottom:none;
  border-left:none;
  transition:color .12s ease;
}
.amp-footer-btn:last-child{ border-right:none }
.amp-footer-btn:hover{ color:#00C49A }
.amp-footer-icon{ font-size:11px; line-height:1 }

/* ══════════════════════════════════════
   LARGE MODE  —  full-width panel
   ══════════════════════════════════════ */
.am-planner.mode-large{
  width:100%;
}

/* Large mode pagination (in header) */
.amp-nav{
  display:flex;
  gap:3px;
  margin-left:8px;
  align-items:center;
}
.amp-nav-btn{
  background:rgba(255,255,255,.07);
  border:.5px solid rgba(255,255,255,.12);
  border-radius:4px;
  padding:2px 8px;
  font-size:8px;
  font-weight:700;
  color:#94A3B8;
  cursor:pointer;
  font-family:'DM Sans',inherit;
  transition:background .12s ease, color .12s ease;
}
.amp-nav-btn.active{
  background:rgba(0,196,154,.15);
  border-color:rgba(0,196,154,.3);
  color:#00C49A;
}
.amp-nav-btn:disabled{
  opacity:.35;
  cursor:default;
}

/* Collapse button */
.amp-collapse{
  background:rgba(255,255,255,.06);
  border:.5px solid rgba(255,255,255,.1);
  border-radius:4px;
  width:18px;
  height:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:9px;
  color:#64748B;
  cursor:pointer;
  margin-left:6px;
}
.amp-collapse:hover{ color:#94A3B8 }

/* Large chip */
.amp-chip-lg{
  border-radius:3px;
  padding:3px 4px;
  background:#E0FAF4;
  border-left:2px solid;
  min-height:34px;
  cursor:pointer;
  min-width:0;
  overflow:hidden;
}
.amp-chip-lg-time{
  font-size:7px;
  font-weight:700;
  color:#00A880;
  display:block;
  margin-bottom:1px;
}
.amp-chip-lg-title{
  font-size:7.5px;
  font-weight:700;
  color:#0D1B2A;
  line-height:1.2;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.amp-empty-lg{
  border-radius:3px;
  background:#F8FAFC;
  min-height:34px;
}

/* ══════════════════════════════════════
   EQUAL-HEIGHT GRID ROWS
   Each band row is a fixed height; cells scroll internally.
   All columns in a row are the same height → consistent real estate.
   ══════════════════════════════════════ */

/* Small and Medium: 3 bands × 90px — equal height across modes and empty state */
.am-planner.mode-small .amp-matrix,
.am-planner.mode-medium .amp-matrix{
  grid-template-rows:repeat(3,90px);
}

/* Empty state matches the 270px matrix area (3 × 90px) */
.am-planner.mode-small .amp-empty-state,
.am-planner.mode-medium .amp-empty-state{
  min-height:270px;
  justify-content:center;
}

/* Cells fill their grid row and scroll if content overflows */
.amp-cell{
  display:flex;
  flex-direction:column;
  gap:2px;
  overflow-y:auto;
  scrollbar-width:none;
}
.amp-cell::-webkit-scrollbar{ display:none }

/* ══════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════ */
.amp-empty-state{
  padding:20px 12px;
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
}
.amp-empty-icon{ font-size:22px; line-height:1 }
.amp-empty-title{
  font-size:11px;
  font-weight:700;
  color:#0D1B2A;
  margin:0;
}
.amp-empty-sub{
  font-size:10px;
  color:#94A3B8;
  margin:0;
}

/* ══════════════════════════════════════
   SCROLL WRAPPER — small / medium all-day scroll
   Date strip + matrix scroll together; band labels sticky
   ══════════════════════════════════════ */
.amp-scroll{
  overflow-x:auto;
  flex:1;
  min-height:0;
  scrollbar-width:thin;
  scrollbar-color:var(--am-slate-200,#E2E8F0) transparent;
  background:#0D1B2A; /* fills any gap to the right of the date strip columns */
}
.amp-matrix-wrap{
  background:#fff; /* explicit white so the matrix area isn't tinted by scroll background */
}
.amp-scroll::-webkit-scrollbar{ height:3px }
.amp-scroll::-webkit-scrollbar-thumb{ background:#E2E8F0; border-radius:999px }

/* Sticky band labels + corner within the scroll container */
.am-planner.mode-small .amp-ds-corner,
.am-planner.mode-medium .amp-ds-corner{
  position:sticky;
  left:0;
  z-index:3;
  background:#0D1B2A;
}
.am-planner.mode-small .amp-band-lbl,
.am-planner.mode-medium .amp-band-lbl{
  position:sticky;
  left:0;
  z-index:2;
  background:#fff;
}

/* ══════════════════════════════════════
   MODAL — large mode
   Modal is ~xl wide; grow tall to be near-square
   ══════════════════════════════════════ */
.am-planner-modal-shell{
  background:transparent;
  border:none;
  box-shadow:none;
  height:100%;
  display:flex;
  flex-direction:column;
}
#plannerModal .modal-dialog{
  min-height:72vh;
}
#plannerModal .modal-content{
  flex:1;
  display:flex;
  flex-direction:column;
}
#plannerModal .am-planner{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
  border-radius:10px;
  overflow:hidden;
}
#plannerModal .amp-matrix-wrap{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

/* Large: 3 equal bands filling modal height */
#plannerModal .amp-matrix{
  flex:1;
  grid-template-rows:repeat(3,1fr);
}

/* Large empty state fills the same space as the matrix */
#plannerModal .amp-empty-state{
  flex:1;
  min-height:0;
  justify-content:center;
}
#plannerModal .amp-cell{
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:#E2E8F0 transparent;
}
#plannerModal .amp-cell::-webkit-scrollbar{ width:3px }
#plannerModal .amp-cell::-webkit-scrollbar-thumb{ background:#E2E8F0; border-radius:999px }
