/* Back Sydney show calendar (year, month, week, day). Shared by the admin and band sites. */
/* On/off switches */
.switchrow { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink, inherit); cursor: pointer; }
.switch { position: relative; flex: none; width: 50px; height: 30px; display: inline-block; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; width: 100%; height: 100%; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line); transition: background .15s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + i { background: var(--good, #2f8f5b); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch.sm { width: 40px; height: 24px; }
.switch.sm i::after { width: 18px; height: 18px; }
.switch.sm input:checked + i::after { transform: translateX(16px); }

.calview { padding: 16px 18px 20px; }
.cal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav .btn { min-width: 40px; font-size: 16px; }
.cal-title { flex: 1; margin: 0; font-size: 22px; min-width: 180px; }
.cal-title small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.cal-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 10px 0 12px; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.cal-switches { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.cal-legend > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.cal-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
/* status colors */
.g-lead { --c: var(--muted); }
.g-sent { --c: #3b6fb6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .g-sent { --c: #7fa9e3; } }
:root[data-theme="dark"] .g-sent { --c: #7fa9e3; }
.g-booked { --c: var(--accent); }
.g-done { --c: var(--good); }
.g-cx { --c: var(--bad); }
.cal-legend i, .cal-dots i { background: var(--c); }
.cal-legend i.g-lead { background: transparent; border: 1.5px dashed var(--muted); }
/* chips and cards */
.cal-chip { display: flex; align-items: baseline; gap: 4px; width: 100%; min-width: 0; text-align: left; border: 0; border-left: 3px solid var(--c); background: var(--panel); color: var(--ink); border-radius: 5px; padding: 3px 6px; font: inherit; font-size: 12.5px; cursor: pointer; }
.cal-chip:hover { background: var(--accent-soft); }
.cal-chip i { font-style: normal; font-weight: 700; color: var(--muted); flex: none; }
.cal-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cal-chip em, .cal-card em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--muted); flex: none; }
.cal-chip.g-lead { border-left-style: dashed; }
.cal-chip.g-cx span, .cal-card.g-cx b { text-decoration: line-through; color: var(--muted); }
.cal-card { display: grid; gap: 2px; width: 100%; text-align: left; border: 1px solid var(--line); border-left: 4px solid var(--c); background: var(--surface); color: var(--ink); border-radius: 10px; padding: 9px 12px; font: inherit; cursor: pointer; }
.cal-card:hover { border-color: var(--accent); border-left-color: var(--c); }
.cal-card.g-lead { border-left-style: dashed; }
.cal-card b { font-size: 15px; }
.cal-card span { font-size: 13px; color: var(--muted); }
.cal-card .cal-st { font-weight: 600; color: var(--c); }
.cal-empty { color: var(--muted); font-size: 13.5px; margin: 6px 0; }
/* month */
.cal-mhead, .cal-mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-mhead span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 6px 6px; }
.cal-mgrid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-cell { min-height: 108px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell.out { background: var(--panel); }
.cal-cell.out .cal-dn { color: var(--muted); opacity: .6; }
.cal-dn { align-self: flex-start; border: 0; background: none; font: inherit; font-weight: 700; font-size: 13px; padding: 2px 6px; border-radius: 999px; cursor: pointer; color: var(--ink); }
.cal-dn:hover { background: var(--panel); }
.cal-cell.today .cal-dn { background: var(--accent); color: var(--accent-ink, #fff); }
.cal-chips { display: grid; gap: 3px; min-width: 0; }
.cal-more { border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--accent); text-align: left; padding: 0 6px; cursor: pointer; }
.cal-dots { display: none; gap: 3px; justify-content: center; }
.cal-dots i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.cal-agenda { display: none; }
/* year */
.cal-year { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 18px; }
.cal-ymh { border: 0; background: none; font: inherit; font-weight: 700; font-size: 15px; padding: 2px 0 6px; cursor: pointer; color: var(--ink); text-align: left; }
.cal-ymh small { font-weight: 500; font-size: 12px; color: var(--accent); }
.cal-ygrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-ydh { font-size: 10.5px; font-weight: 700; color: var(--muted); text-align: center; }
.cal-yd { border: 0; background: none; font: inherit; font-size: 12px; aspect-ratio: 1; border-radius: 6px; cursor: pointer; color: var(--ink); padding: 0; min-width: 0; }
.cal-yd:hover { background: var(--panel); }
.cal-yd.has { background: var(--c); color: #fff; font-weight: 700; }
.cal-yd.has.g-lead { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--muted); }
.cal-yd.today { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-yd.out { visibility: hidden; }
/* week */
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-wday { border: 1px solid var(--line); border-radius: 12px; padding: 8px; min-height: 180px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cal-wday.today { border-color: var(--accent); }
.cal-wh { display: flex; align-items: baseline; gap: 6px; border: 0; background: none; font: inherit; cursor: pointer; padding: 0; color: var(--ink); }
.cal-wh span { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.cal-wh b { font-size: 18px; }
.cal-wday.today .cal-wh b { color: var(--accent); }
.cal-wlist { display: grid; gap: 6px; }
.cal-wlist .cal-card { padding: 7px 9px; }
.cal-wlist .cal-card b { font-size: 13.5px; }
.cal-wlist .cal-card span { font-size: 12px; }
/* day */
.cal-day { display: grid; gap: 10px; max-width: 640px; }
.cal-day .cal-card { padding: 14px 16px; }
.cal-day .cal-card b { font-size: 18px; }
.cal-day .cal-card span { font-size: 14px; }
.cal-undated { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.cal-undated b { font-size: 13px; color: var(--muted); margin-right: 4px; }
.cal-undated .cal-chip { width: auto; max-width: 260px; }
@media (max-width: 1100px) { .cal-year { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .calview { padding: 12px; }
  .cal-title { font-size: 19px; order: -1; flex-basis: 100%; }
  .cal-year { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cal-cell { min-height: 54px; align-items: center; padding: 3px 1px; }
  .cal-cell .cal-dn { align-self: center; }
  .cal-chips { display: none; }
  .cal-dots { display: flex; }
  .cal-agenda { display: grid; gap: 8px; margin-top: 14px; }
  .cal-arow { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; align-items: start; }
  .cal-adate { display: grid; text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding-top: 6px; }
  .cal-adate b { font-size: 18px; color: var(--ink); }
  .cal-week { grid-template-columns: minmax(0, 1fr); }
  .cal-wday { min-height: 0; flex-direction: row; align-items: flex-start; }
  .cal-wday.empty { padding: 6px 8px; }
  .cal-wh { flex-direction: column; align-items: center; width: 40px; flex: none; gap: 0; }
  .cal-wlist { flex: 1; min-width: 0; }
  .cal-wday.empty .cal-empty { margin: 4px 0; }
}

/* Day view: hour grid */
.cal-hours { position: relative; height: 576px; max-height: 68vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cal-hgrid { position: relative; margin-left: 52px; }
.cal-hr { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.cal-hr.midnight { border-top: 2px solid var(--muted); }
.cal-hr.midnight span { width: 50px; left: -52px; }
.cal-hr span { position: absolute; left: -48px; top: -8px; width: 42px; text-align: right; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.cal-lanes { position: absolute; inset: 0 6px 0 4px; }
.cal-blk { position: absolute; display: flex; flex-direction: column; gap: 1px; overflow: hidden; text-align: left; border: 0; border-left: 4px solid var(--c); border-radius: 6px; padding: 3px 8px; font: inherit; font-size: 12.5px; cursor: pointer; color: var(--ink); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.cal-blk.k-load { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, var(--surface)) 0 6px, var(--surface) 6px 12px); }
.cal-blk.k-check { background: color-mix(in srgb, var(--c) 8%, var(--surface)); border-left-style: dotted; }
.cal-blk.k-show { background: color-mix(in srgb, var(--c) 22%, var(--surface)); }
.cal-blk.g-lead { border-left-style: dashed; }
.cal-blk:hover { outline: 2px solid var(--c); outline-offset: -1px; z-index: 2; }
.cal-blk b { font-size: 12.5px; }
.cal-blk span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-blk .nm { color: var(--ink); font-weight: 600; }
.cal-now { position: absolute; left: -6px; right: 0; height: 2px; background: var(--bad); z-index: 3; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.cal-allday { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.cal-allday b { font-size: 13px; color: var(--muted); margin-right: 4px; }
.cal-allday .cal-chip { width: auto; max-width: 280px; }
.cal-dayh { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 16px 0 8px; }
@media (max-width: 900px) { .cal-hours { height: 60vh; } }

/* Pending (leads and quotes): dashed, faded, and tagged */
.cal-chip em.pend, .cal-card em.pend, .cal-blk em.pend { font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px dashed var(--muted); border-radius: 999px; padding: 0 6px; flex: none; }
.cal-chip.g-lead span, .cal-card.g-lead b { color: var(--muted); }
.cal-card.g-lead, .cal-blk.g-lead { opacity: .85; }
.cal-blk.g-lead { background: repeating-linear-gradient(135deg, var(--panel) 0 6px, var(--surface) 6px 12px); }
.cal-dots i.g-lead { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }

/* "Only my events" checkbox */
.checkrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.checkrow input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }

/* Charity / unpaid shows */
.cal-chip em.pend.charity, .cal-card em.pend.charity, .cal-blk em.pend.charity { border-style: solid; color: var(--good); border-color: var(--good); }
/* Days marked "can't play" */
.cal-cell.off, .cal-wday.off { background: repeating-linear-gradient(135deg, transparent 0 7px, color-mix(in srgb, var(--bad) 9%, transparent) 7px 14px); }
.cal-yd.off:not(.has) { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bad) 55%, transparent); color: var(--bad); }
.cal-legend i.g-off { background: repeating-linear-gradient(135deg, transparent 0 2px, var(--bad) 2px 4px); }
.cal-offnote { margin: 0 0 10px; color: var(--bad); font-weight: 600; font-size: 13.5px; }
/* Day view: notes and setlist under a show's card */
.cal-dayitem { display: grid; gap: 6px; }
.cal-dayextra { padding: 0 4px 6px 12px; display: grid; gap: 8px; }
.cal-dayextra .note { margin: 0; }
