/**
 * League calendar — ported from the approved calendar mockup.
 *
 * Class names carry a wps-cal- prefix. The mockup used bare names (cell, chip,
 * more, modal) that collide with core block and theme CSS inside WordPress;
 * the values themselves are unchanged from the reference.
 */
.wps-cal-section { padding:38px 0 80px }
.wps-cal-toolbar { display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:22px }
.wps-cal-monthnav { display:flex;align-items:center;gap:12px }
.wps-cal-monthnav h2 { font-size:clamp(24px,3vw,34px);color:var(--wp--preset--color--pine);min-width:8.5ch }
.wps-cal-navbtn { width:42px;height:42px;border-radius:50%;border:1px solid var(--wps-line);background:#fff;cursor:pointer;color:var(--wp--preset--color--pine);display:grid;place-items:center;transition:.2s }
.wps-cal-navbtn:hover { background:var(--wp--preset--color--pine);color:#fff }
.wps-cal-navbtn svg { width:18px;height:18px }
.wps-cal-todaybtn { font-family:var(--wp--preset--font-family--display);font-weight:600;text-transform:uppercase;letter-spacing:.05em;font-size:12.5px;padding:10px 16px;border-radius:8px;border:1px solid var(--wps-line);background:#fff;color:var(--wp--preset--color--pine);cursor:pointer;transition:.2s }
.wps-cal-todaybtn:hover { background:var(--wp--preset--color--pine);color:#fff }
.wps-cal-toolbar-right { margin-left:auto;display:flex;align-items:center;gap:10px;flex-wrap:wrap }
.wps-cal-viewtoggle { display:inline-flex;background:#fff;border:1px solid var(--wps-line);border-radius:9px;overflow:hidden }
.wps-cal-viewtoggle button { display:inline-flex;align-items:center;gap:8px;font-family:var(--wp--preset--font-family--display);font-weight:600;text-transform:uppercase;letter-spacing:.05em;font-size:12.5px;padding:10px 16px;border:none;background:transparent;color:var(--wp--preset--color--pine);cursor:pointer;transition:.15s }
.wps-cal-viewtoggle button svg { width:16px;height:16px }
.wps-cal-viewtoggle button.is-on { background:var(--wp--preset--color--pine);color:#fff }
.wps-cal-filters { display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:24px }
.wps-cal-filters .wps-cal-flabel { font-family:var(--wp--preset--font-family--display);font-weight:600;text-transform:uppercase;letter-spacing:.12em;font-size:11px;color:#7a8576;margin-right:4px }
.wps-cal-fchip { display:inline-flex;align-items:center;gap:7px;font-family:var(--wp--preset--font-family--display);font-weight:500;text-transform:uppercase;letter-spacing:.03em;font-size:12px;padding:7px 13px;border-radius:30px;border:1px solid var(--wps-line);background:#fff;color:var(--wp--preset--color--ink);cursor:pointer;transition:.15s;user-select:none }
.wps-cal-fchip:hover { border-color:var(--wp--preset--color--pine) }
.wps-cal-fchip[aria-pressed="true"] { background:var(--wp--preset--color--pine);color:#fff;border-color:var(--wp--preset--color--pine) }
.wps-cal-fchip[aria-pressed="true"] .wps-cal-sico { color:#fff }
.wps-cal-sico { flex:none;display:block;color:var(--wps-c,var(--wp--preset--color--pine)) }
.wps-cal-sico svg,.wps-cal-sico img { width:100%;height:100%;display:block }
.wps-cal-fchip[aria-pressed="true"] .wps-cal-sico,.wps-cal-chip.is-oneday .wps-cal-sico,.wps-cal-day-item.is-oneday .wps-cal-sico, .wps-cal-ag-item .wps-cal-ag-sport .wps-cal-sico,.wps-cal-evcard .wps-cal-ev-sport .wps-cal-sico { background:#fff;border-radius:50%;box-shadow:0 0 0 1.5px #fff }
.wps-cal-fchip .wps-cal-sico { width:16px;height:16px }
.wps-cal-scroll { overflow-x:auto;-webkit-overflow-scrolling:touch }
.wps-cal { min-width:900px;background:var(--wps-line);border:1px solid var(--wps-line);border-radius:16px;overflow:hidden;box-shadow:var(--wps-shadow) }
.wps-cal-dow { display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;background:var(--wps-line) }
.wps-cal-dow > div { background:var(--wp--preset--color--pine);color:#fff;font-family:var(--wp--preset--font-family--display);font-weight:600;text-transform:uppercase;letter-spacing:.1em;font-size:12px;line-height:1.4;text-align:center;padding:12px 4px }
.wps-cal-body { display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:1px;background:var(--wps-line) }
.wps-cal-cell { background:#fff;min-height:126px;min-width:0;padding:8px 8px 10px;display:flex;flex-direction:column;gap:5px;position:relative }
.wps-cal-cell.is-other { background:#f6f4ee }
.wps-cal-cell.is-other .wps-cal-dnum { color:#b7b3a6 }
.wps-cal-cell .wps-cal-dnum { font-family:var(--wp--preset--font-family--display);font-weight:600;font-size:14px;color:var(--wp--preset--color--ink);align-self:flex-start;line-height:1;padding:3px 2px }
.wps-cal-cell.is-today .wps-cal-dnum { background:var(--wp--preset--color--amber);color:#3a1d06;border-radius:50%;width:26px;height:26px;display:grid;place-items:center }
.wps-cal-cell.is-weekend { background:#fbfaf5 }
.wps-cal-cell-events { display:flex;flex-direction:column;gap:5px;min-width:0 }
.wps-cal-chip { display:flex;align-items:center;gap:7px;padding:5px 8px;border-radius:7px;background:#fbfaf4;border:1px solid var(--wps-line);border-left:3px solid var(--wps-c,var(--wp--preset--color--pine));cursor:pointer;transition:.13s;text-align:left;width:100%;min-width:0 }
.wps-cal-chip:hover { background:#fff;transform:translateX(1px);box-shadow:0 6px 16px -10px rgba(6,30,18,.5) }
.wps-cal-chip .wps-cal-sico { width:15px;height:15px }
.wps-cal-chip.is-oneday { background:var(--wps-c,var(--wp--preset--color--pine));border-color:var(--wps-c,var(--wp--preset--color--pine)) }
.wps-cal-chip.is-oneday .wps-cal-ctxt { color:#fff }
.wps-cal-chip.is-oneday .wps-cal-ctime { color:rgba(255,255,255,.82) }
.wps-cal-chip.is-oneday .wps-cal-sico { color:#fff }
.wps-cal-chip.is-oneday:hover { background:var(--wps-c,var(--wp--preset--color--pine)) }
.wps-cal-chip .wps-cal-ctxt { flex:1 1 auto;min-width:0;font-family:var(--wp--preset--font-family--body);font-size:12px;font-weight:700;color:var(--wp--preset--color--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2 }
.wps-cal-chip .wps-cal-ctime { font-family:var(--wp--preset--font-family--display);font-size:10.5px;color:#7a8576;flex:none }
.wps-cal-more { font-family:var(--wp--preset--font-family--display);font-weight:600;text-transform:uppercase;letter-spacing:.04em;font-size:10.5px;color:var(--wp--preset--color--amber-deep);cursor:pointer;padding:2px 4px }
.wps-cal-more:hover { text-decoration:underline }
.wps-cal-empty { background:#fff;border:1px dashed var(--wps-line);border-radius:16px;padding:60px 20px;text-align:center;color:#7a8576;font-family:var(--wp--preset--font-family--body);font-style:italic;font-size:16px }
.wps-cal-agenda { display:none;flex-direction:column;gap:26px }
.wps-cal-agenda.is-on { display:flex }
.wps-cal.is-hidden,.wps-cal-scroll.is-hidden { display:none }
.wps-cal-ag-day { display:grid;grid-template-columns:120px minmax(0,1fr);gap:20px }
.wps-cal-ag-date { font-family:var(--wp--preset--font-family--display);text-transform:uppercase }
.wps-cal-ag-date .d { font-size:34px;font-weight:700;color:var(--wp--preset--color--pine);line-height:.9 }
.wps-cal-ag-date .m { font-size:13px;letter-spacing:.12em;color:var(--wp--preset--color--amber-deep) }
.wps-cal-ag-date .w { font-size:12px;color:#7a8576;letter-spacing:.08em }
.wps-cal-ag-list { display:flex;flex-direction:column;gap:12px;min-width:0 }
.wps-cal-ag-item { display:flex;align-items:center;gap:14px;background:#fff;border:1px solid var(--wps-line);border-left:4px solid var(--wps-c,var(--wp--preset--color--pine));border-radius:12px;padding:14px 18px;box-shadow:0 10px 30px -24px rgba(6,30,18,.5);cursor:pointer;transition:.15s;min-width:0 }
.wps-cal-ag-item>div { min-width:0 }
.wps-cal-ag-item:hover { transform:translateY(-2px);box-shadow:var(--wps-shadow) }
.wps-cal-ag-item .wps-cal-ag-sport { display:inline-flex;align-items:center;gap:6px;font-family:var(--wp--preset--font-family--display);font-weight:500;text-transform:uppercase;letter-spacing:.1em;font-size:10.5px;color:#fff;background:var(--wps-c,var(--wp--preset--color--pine));padding:4px 10px;border-radius:30px;flex:none }
.wps-cal-ag-item .wps-cal-ag-sport .wps-cal-sico { width:14px;height:14px;color:#fff }
.wps-cal-ag-item.is-oneday { background:color-mix(in srgb,var(--wps-c,var(--wp--preset--color--pine)) 13%,#fff);border-color:color-mix(in srgb,var(--wps-c,var(--wp--preset--color--pine)) 32%,#fff) }
.wps-cal-ag-item h4 { font-family:var(--wp--preset--font-family--display);font-weight:600;font-size:17px;color:var(--wp--preset--color--ink);text-transform:none }
.wps-cal-ag-item .wps-cal-ag-meta { font-family:var(--wp--preset--font-family--body);font-size:13px;color:#5d6557;margin-top:2px }
.wps-cal-ag-item .wps-cal-ag-go { margin-left:auto;color:var(--wp--preset--color--amber-deep);font-family:var(--wp--preset--font-family--display);font-weight:600;text-transform:uppercase;font-size:12px;letter-spacing:.05em;flex:none }
.wps-cal-evcard { font-size:16px;line-height:normal;width:320px;background:#fff;border:1px solid var(--wps-line);border-top:4px solid var(--wps-c,var(--wp--preset--color--pine));border-radius:14px;box-shadow:0 34px 64px -26px rgba(6,30,18,.6);overflow:hidden }
.wps-cal-evcard .wps-cal-ev-head { padding:16px 18px 12px;background:linear-gradient(160deg,rgba(8,88,50,.05),transparent) }
.wps-cal-evcard .wps-cal-ev-sport { display:inline-flex;align-items:center;gap:7px;font-family:var(--wp--preset--font-family--display);font-weight:500;text-transform:uppercase;letter-spacing:.1em;font-size:10.5px;color:#fff;background:var(--wps-c,var(--wp--preset--color--pine));padding:4px 10px;border-radius:30px }
.wps-cal-evcard .wps-cal-ev-sport .wps-cal-sico { width:15px;height:15px;color:#fff }
.wps-cal-evcard h3 { font-family:var(--wp--preset--font-family--display);font-weight:600;font-size:19px;color:var(--wp--preset--color--ink);text-transform:none;line-height:1.12;margin-top:11px }
.wps-cal-evcard .wps-cal-ev-body { padding:6px 18px 16px }
.wps-cal-evrow { display:flex;align-items:flex-start;gap:10px;padding:7px 0;border-bottom:1px solid var(--wps-line);font-size:13.5px;color:#3f4a3c }
.wps-cal-evrow:last-of-type { border-bottom:none }
.wps-cal-evrow svg { width:16px;height:16px;color:var(--wp--preset--color--pine);flex:none;margin-top:2px }
.wps-cal-evrow b { font-weight:700;color:var(--wp--preset--color--ink) }
.wps-cal-muted { color:#7a8576 }
.wps-cal-badges { display:flex;gap:8px;flex-wrap:wrap;padding:10px 18px 0 }
.wps-cal-badge { font-family:var(--wp--preset--font-family--display);font-weight:600;text-transform:uppercase;letter-spacing:.05em;font-size:10.5px;padding:5px 10px;border-radius:30px }
.wps-cal-badge.is-fmt { background:#e7efe9;color:var(--wp--preset--color--pine) }
.wps-cal-badge.is-open { background:#e6f4ea;color:#1d7a45 }
.wps-cal-badge.is-soon { background:#fdf0e2;color:var(--wp--preset--color--amber-deep) }
.wps-cal-badge.is-prog { background:#eef1ee;color:#5d6557 }
.wps-cal-ev-cta { display:block;margin:14px 18px 18px;text-align:center;background:var(--wp--preset--color--amber);color:#3a1d06;font-family:var(--wp--preset--font-family--display);font-weight:600;text-transform:uppercase;letter-spacing:.04em;font-size:13px;padding:12px;border-radius:8px;transition:transform .15s }
.wps-cal-ev-cta:hover { transform:translateY(-2px) }
.wps-cal-popover { position:fixed;z-index:150;display:none;pointer-events:auto }
.wps-cal-popover.is-shown { display:block;animation:pop .12s ease-out }
.wps-cal-modal { position:fixed;inset:0;z-index:200;background:rgba(4,14,9,.82);backdrop-filter:blur(6px);display:none;align-items:center;justify-content:center;padding:22px;opacity:0;transition:opacity .2s }
.wps-cal-modal.is-open { display:flex;opacity:1 }
.wps-cal-modal-box { width:min(720px,100%);max-height:88vh;overflow:auto;position:relative }
/* the card is 320px as a hover popover; in the modal it fills the wider box */
.wps-cal-modal-box .wps-cal-evcard { width:100% }
.wps-cal-modal-box.is-day { width:min(640px,100%);background:#fff;border-radius:16px;border-top:4px solid var(--wp--preset--color--amber);padding:20px 20px 22px }
.wps-cal-modal-box.is-day h3 { font-family:var(--wp--preset--font-family--display);font-weight:600;font-size:20px;color:var(--wp--preset--color--pine);text-transform:none;margin-bottom:4px }
.wps-cal-modal-box.is-day .wps-cal-dsub { font-family:var(--wp--preset--font-family--body);font-style:italic;color:#7a8576;font-size:14px;margin-bottom:16px }
.wps-cal-day-list { display:flex;flex-direction:column;gap:10px }
.wps-cal-day-item { display:flex;align-items:center;gap:12px;border:1px solid var(--wps-line);border-left:4px solid var(--wps-c,var(--wp--preset--color--pine));border-radius:11px;padding:12px 14px;cursor:pointer;transition:.15s }
.wps-cal-day-item:hover { background:#faf8f2;transform:translateX(2px) }
.wps-cal-day-item .wps-cal-sico { width:20px;height:20px }
.wps-cal-day-item.is-oneday { background:var(--wps-c,var(--wp--preset--color--pine));border-color:var(--wps-c,var(--wp--preset--color--pine)) }
.wps-cal-day-item.is-oneday h4 { color:#fff }
.wps-cal-day-item.is-oneday small { color:rgba(255,255,255,.85) }
.wps-cal-day-item.is-oneday .wps-cal-sico { color:#fff }
.wps-cal-day-item.is-oneday:hover { background:var(--wps-c,var(--wp--preset--color--pine)) }
.wps-cal-day-item h4 { font-family:var(--wp--preset--font-family--display);font-weight:600;font-size:15px;text-transform:none;color:var(--wp--preset--color--ink) }
.wps-cal-day-item small { font-family:var(--wp--preset--font-family--body);color:#7a8576;font-size:12.5px }
/* Inside the card, not above it. The reference floats this 46px over the top
   edge, which lands off-screen the moment the viewport is short — measured at
   -4px on a 700px-tall window and -34px on a phone, i.e. no way to close the
   card except Esc or a click on the backdrop. */
.wps-cal-mclose {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 4;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--wps-line);
	background: rgba(255, 255, 255, .94);
	backdrop-filter: blur(4px);
	color: var(--wp--preset--color--pine);
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: .18s;
	box-shadow: 0 6px 18px -8px rgba(6, 30, 18, .5);
}
.wps-cal-mclose:hover,
.wps-cal-mclose:focus-visible {
	background: var(--wp--preset--color--pine);
	color: #fff;
	border-color: var(--wp--preset--color--pine);
}
.wps-cal-mclose svg { width: 18px; height: 18px; }
/* keep the title clear of the button. Scoped to the modal: the hover popover
   uses the same card and has no close button. `.wps-cal-evcard .wps-cal-ev-head`
   sets the padding shorthand earlier in this file, so this needs equal weight. */
.wps-cal-modal-box .wps-cal-ev-head { padding-right: 56px; }
.wps-cal-modal-box.is-day > .wps-cal-modal-content > h3 { padding-right: 46px; }

@media (max-width:720px) {
	.wps-cal-toolbar-right { width:100%;margin-left:0 }
	.wps-cal-ag-day { grid-template-columns:64px 1fr;gap:14px }
	.wps-cal-ag-item { flex-wrap:wrap }
	.wps-cal-ag-item .wps-cal-ag-go { margin-left:0 }
}

@media (max-width:640px) {
	.wps-cal-dow > div { font-size:9.5px;line-height:1.45;letter-spacing:.02em;padding:9px 1px }

	/* The reference narrows its page gutter from 32px to 5px here. Core's
	   constrained layout sets `margin-left/right: auto !important` on every
	   direct child, which beats even an inline style — so matching it needs
	   !important of our own. Verified: without this the grid is 326px on a
	   390px phone against the reference's 380px. */
	.wps-cal-section.wps-cal-section { margin-left:-27px !important; margin-right:-27px !important }
	.wps-cal-scroll { overflow:visible }
	.wps-cal { min-width:0 }
	.wps-cal-cell { min-height:60px;padding:4px 3px 6px;gap:4px }
	.wps-cal-cell.has-ev { cursor:pointer }
	.wps-cal-cell.has-ev:active { background:#eef3ee }
	.wps-cal-cell .wps-cal-dnum { font-size:12px;padding:2px }
	.wps-cal-cell.is-today .wps-cal-dnum { width:22px;height:22px }
	.wps-cal-cell-events { flex-direction:row;flex-wrap:wrap;gap:4px;align-items:center;padding-left:2px }
	.wps-cal-chip { width:auto;padding:0;border:none;background:none!important;box-shadow:none!important;transform:none!important;pointer-events:none }
	.wps-cal-chip .wps-cal-ctxt,.wps-cal-chip .wps-cal-ctime { display:none }
	.wps-cal-chip .wps-cal-sico { width:15px;height:15px }
	.wps-cal-chip.is-oneday { background:var(--wps-c,var(--wp--preset--color--pine))!important;border-radius:50%;padding:3.5px }
	.wps-cal-chip.is-oneday .wps-cal-sico { color:#fff }
	.wps-cal-cell-events { gap:3px }
	.wps-cal-more { width:100%;font-size:9px;padding:1px 0 0;pointer-events:none;letter-spacing:.02em }
	.wps-cal-toolbar { gap:12px }
	.wps-cal-monthnav h2 { font-size:22px;min-width:auto }
	.wps-cal-filters { gap:6px;margin-bottom:20px }
	.wps-cal-filters .wps-cal-flabel { width:100%;margin-bottom:2px;font-size:10px }
	.wps-cal-fchip { padding:5px 10px;font-size:10.5px;gap:6px }
	.wps-cal-fchip .wps-cal-sico { width:14px;height:14px }
	.wps-cal-viewtoggle { width:100% }
	.wps-cal-viewtoggle button { flex:1;justify-content:center;padding:8px 10px;font-size:11px;gap:6px }
	.wps-cal-viewtoggle button svg { width:14px;height:14px }
}

/* league description — modal only, never the hover popover */
.wps-cal-desc {
	/* No border-top: the row above already draws one. With the description
	   present that row stops being :last-of-type and keeps its rule, so a second
	   border here read as a double line. */
	white-space: pre-line;     /* the feed's own line breaks are the formatting */
	overflow-wrap: anywhere;   /* the feed puts bare rules URLs in here */
	font-size: 15px;
	line-height: 1.5;
	color: var(--wp--preset--color--muted);
	margin-top: 12px;
	padding-top: 12px;
	max-height: 220px;
	overflow-y: auto;
}

/* The mockup's body is line-height:normal; the theme's 1.55 is inherited by every
   row inside these components and inflates them. Scope it, do not touch the body. */
.wps-cal-evcard,
.wps-cal-ag-day,
.wps-cal-ag-item,
.wps-cal-day-item,
.wps-cal-popover { font-size: 16px; line-height: normal; }
/* theme.json gives every heading line-height 1.02; these two are body-scale
   titles inside a card, and the reference leaves them at the normal metric. */
.wps-cal-ag-item h4,
.wps-cal-day-item h4 { line-height: normal; }

/* The theme gives headings a bottom margin; the reference card's h3 has none.
   Same for the day-modal and agenda headings, which are h3/h4 inside our markup. */
.wps-cal-evcard h3 { margin-block-end: 0; }
.wps-cal-ag-item h4,
.wps-cal-day-item h4 { margin-block: 0; }
.wps-cal-modal-content > h3 { margin-block-start: 0; }

/* archived = the league finished and LeagueLab dropped it from the feed */
.wps-cal-badge.is-past { background:#eceff1; color:#5b6670; }
.wps-cal-chip.is-past { opacity:.62; }

/* On a phone the modal is the whole screen, so the box must carry its own
   surface — otherwise the card floats on the dark scrim and the day list, which
   has no card of its own, is unreadable. */
@media (max-width: 640px) {
	.wps-cal-modal { padding: 12px; align-items: flex-start; }
	.wps-cal-modal-box,
	.wps-cal-modal-box.is-day { width: 100%; max-height: 92vh; }
	.wps-cal-modal-box.is-day { padding: 18px 16px 20px; }
}

/* the list rows are buttons now, not links — keep them looking clickable */
.wps-cal-ag-item[data-wps-event] { cursor: pointer; }
