/* v7.6.74 — Events (Account / Settings → Events, Solo Round Setup Event card, shared Event editor sheet).
   Uses existing Canardly tokens/components: .course-item rows, .form-input, .chip, .cc2-seg-btn (two-choice
   standard), .btn-gold, and the Round Setup card/selection treatment (#2ecc71 selected state). */

/* ── Solo Round Setup: Event option cards (same treatment as Practice Game cards) ── */
#v3-event-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.v3-event-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  padding: 9px 14px; border-radius: 12px; border: 1.5px solid rgba(15,30,55,0.34); background: #f2f4f6;
  font-family: 'DM Sans', sans-serif; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.v3-event-card-selected { border-color: #2ecc71; background: rgba(46,204,113,0.16); }
.v3-event-card:focus-visible, .v3-event-add-btn:focus-visible, .cev-event-row:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.v3-event-card-name { font-size: 15px; font-weight: 700; color: var(--green-deep); line-height: 1.25; }
.v3-event-card-check { color: #1a7a3c; font-weight: 900; margin-left: 2px; }
.v3-event-card-meta { font-size: 12.5px; color: #555e6a; line-height: 1.35; }
.v3-event-add-btn {
  width: 100%; min-height: 44px; padding: 9px 14px; border-radius: 12px;
  border: 1.5px dashed rgba(15,30,55,0.34); background: transparent; color: var(--green-deep);
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent;
}

/* ── Account / Settings → Events ── */
.cev-row-detail { color: var(--green-deep); opacity: 0.8; }
.cev-empty { text-align: center; padding: 28px 16px; color: var(--sage); font-size: 14px; line-height: 1.5; }
.cev-archived-toggle {
  display: block; margin: 14px auto 8px; background: none; border: none; color: var(--sage);
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer;
}
#cev-archived-list .cev-event-row { opacity: 0.7; }

/* ── Editor sheet ── */
.cev-overlay {
  position: absolute; inset: 0; z-index: 900; background: rgba(10,18,32,0.72);
  display: flex; align-items: flex-end; justify-content: center;
}
.cev-overlay-fixed { position: fixed; }
.cev-sheet {
  width: 100%; max-width: 520px; max-height: 92%; display: flex; flex-direction: column;
  background: var(--cream); border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,0.35);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.cev-sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; border-bottom: 1px solid var(--cream-dark); }
.cev-sheet-title { flex: 1; font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--green-deep); }
.cev-close {
  width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--cream-dark); background: var(--white);
  color: var(--green-deep); font-size: 22px; font-weight: 800; line-height: 1; cursor: pointer;
}
.cev-sheet-body { padding: 12px 18px 6px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cev-label { display: block; font-size: 13px; font-weight: 600; color: var(--green-deep); margin: 12px 0 6px; }
.cev-req { color: #b43232; }
.cev-opt { font-weight: 400; font-size: 11px; color: var(--sage); }
.cev-input { padding: 11px 14px; font-size: 15px; box-sizing: border-box; }
select.cev-input:disabled { opacity: 1; background: #efe9dd; color: var(--green-deep); }
.cev-row { display: flex; gap: 10px; }
.cev-col { flex: 1; min-width: 0; }
.cev-chips { margin-bottom: 8px; }
.cev-chips .chip { font-family: 'DM Sans', sans-serif; font-weight: 700; }
.cev-source { margin-top: 14px; font-size: 12px; color: var(--sage); }
.cev-error { min-height: 18px; margin-top: 8px; font-size: 13px; font-weight: 700; color: #b43232; }
.cev-sheet-foot { display: flex; flex-direction: column; gap: 8px; padding: 10px 18px 18px; border-top: 1px solid var(--cream-dark); }
.cev-save { padding: 14px; }
.cev-archive {
  padding: 11px; border-radius: 12px; border: 2px solid #c94d12; background: var(--white); color: #c94d12;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer;
}
.cev-cancel {
  padding: 10px; border-radius: 12px; border: none; background: rgba(26,45,74,0.07); color: var(--green-deep);
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer;
}
@media (prefers-reduced-motion: no-preference) {
  .cev-sheet { animation: cevSheetIn 0.22s cubic-bezier(.2,.8,.4,1) both; }
  @keyframes cevSheetIn { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ═══════════════════════════════════════════════════════════════════════
   v7.6.75 — compact Canardly nav/action control row
   (Events page top row + Choose Tees Event row). White/cream surface,
   navy text + border, burnt orange #CC5500 for the active choice, subtle
   radius, no shadow. Sizes proportionally on narrow screens.
   ═══════════════════════════════════════════════════════════════════════ */
.cev-nav {
  display: flex; align-items: stretch; width: 100%;
  gap: 5px;
}
.cev-nav-btn {
  flex: 1 1 0; min-width: 0; height: 37px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border-radius: 9px; border: 1.5px solid rgba(26,45,74,0.55); background: #fffdf8; color: #1a2d4a;
  font-family: 'DM Sans', sans-serif; font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; box-shadow: none; -webkit-tap-highlight-color: transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.cev-nav-btn.active, .cev-nav-btn[aria-pressed="true"] {
  background: #CC5500; border-color: #CC5500; color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}
.cev-nav-btn:active { transform: translateY(1px); }
.cev-nav-btn:focus-visible { outline: 2px solid #CC5500; outline-offset: 2px; }
/* "+ Add Event" is an action, not a filter toggle — a hairline-lighter, slightly
   narrower treatment (own flex-basis, subtle left margin) keeps the two real
   toggle choices (Upcoming/Past) reading as a pair and this as the separate action,
   without a heavier visual footprint than the toggles it sits beside. */
.cev-nav-add {
  flex: 0 1 34%; margin-left: 4px;
  color: #1a2d4a; background: #fffdf8; border-color: rgba(26,45,74,0.30);
  font-weight: 700;
}
.cev-nav-add .cev-plus { color: #CC5500; }
.cev-nav-add:hover { border-color: #CC5500; }
.cev-plus { font-weight: 900; font-size: 1.2em; line-height: 1; }
.cev-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: #CC5500; color: #fff; font-size: 10px; font-weight: 800;
}
.cev-events-nav { margin-bottom: 16px; }
@media (max-width: 360px) {
  .cev-nav { gap: 4px; }
  .cev-nav-btn { height: 34px; padding: 0 6px; font-size: 11.5px; letter-spacing: 0.01em; }
  .cev-nav-add { flex-basis: 38%; margin-left: 3px; }
}
/* The global \"strong selected\" outline (css/11-style.css) must not fight the orange state. */
.screen .cev-nav-btn { outline: none; }

/* ── Choose Tees: Event section ── */
.cev-tee-event {
  margin: 4px 0 10px; padding: 10px 12px; border-radius: 12px;
  background: #ffffff; border: 1.5px solid rgba(26,45,74,0.16);
}
.cev-tee-label { font-size: 11px; font-weight: 800; color: #1a2d4a; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 7px; }
.cev-tee-label .cev-opt { text-transform: none; letter-spacing: 0; }
.cev-tee-summary {
  margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  font-size: 13px; font-weight: 700; color: #1a2d4a; line-height: 1.3;
}
.cev-tee-summary-text { flex: 1 1 auto; min-width: 0; }
.cev-tee-lock {
  flex: 0 0 auto; font-size: 11px; font-weight: 800; color: #CC5500;
  border: 1px solid rgba(204,85,0,0.45); border-radius: 6px; padding: 2px 6px; background: rgba(204,85,0,0.06);
}
#tee-options.cev-tees-locked .tee-option.cev-tee-disabled { opacity: 0.42; filter: grayscale(0.4); }

/* Select Event picker */
.cev-picker-sheet { max-height: 70%; }
.cev-picker-course { font-size: 13px; font-weight: 700; color: var(--sage); margin: 2px 0 10px; }
.cev-picker-list { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; }

/* ── Round Setup: compact Event summary ── */
.v3-event-summary {
  align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px;
  background: #ffffff; border: 1.5px solid rgba(204,85,0,0.45);
}
.v3-event-summary-k { flex: 0 0 auto; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #CC5500; }
.v3-event-summary-text { flex: 1 1 auto; min-width: 0; font-size: 13px; font-weight: 700; color: #1a2d4a; line-height: 1.3; }
.v3-event-summary-change, .v3-pg-change {
  flex: 0 0 auto; height: 30px; padding: 0 10px; border-radius: 7px; border: 1.5px solid #1a2d4a; background: #fffdf8;
  color: #1a2d4a; font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 700; cursor: pointer;
}

/* ── Round Setup: compact Practice Game row ── */
.v3-pg-add {
  height: 36px; padding: 0 14px; border-radius: 8px; border: 1.5px solid #1a2d4a; background: #fffdf8;
  color: #1a2d4a; font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
}
.v3-pg-add .cev-plus { color: #CC5500; }
.v3-pg-selected { display: flex; align-items: center; gap: 8px; }
.v3-pg-text { flex: 1 1 auto; min-width: 0; font-size: 14px; color: #1a2d4a; line-height: 1.3; }
.v3-pg-k { font-weight: 600; color: #555e6a; }
.v3-pg-name { font-weight: 800; }
.v3-pg-goal { display: block; font-size: 12px; font-weight: 800; color: #1a7a3c; margin-top: 1px; }
.v3-pg-remove {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 7px; border: 1.5px solid rgba(26,45,74,0.35); background: transparent;
  color: #1a2d4a; font-size: 18px; font-weight: 800; line-height: 1; cursor: pointer;
}
.v3-pg-add:focus-visible, .v3-pg-change:focus-visible, .v3-pg-remove:focus-visible, .v3-event-summary-change:focus-visible { outline: 2px solid #CC5500; outline-offset: 2px; }

/* ── Completed Scorecard: Share ── */
#screen-scorecard .sc-share-btn {
  flex: 0 0 auto; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 10px;
  border-radius: 8px; border: 1.5px solid #ffffff; background: #fffdf8; color: #1a2d4a;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 800; letter-spacing: 0.01em;
  cursor: pointer; box-shadow: none; -webkit-tap-highlight-color: transparent;
}
#screen-scorecard .sc-share-btn .sc-share-icon { color: #CC5500; flex: 0 0 auto; }
#screen-scorecard .sc-share-btn:active { transform: translateY(1px); }
#screen-scorecard .sc-share-btn:focus-visible { outline: 2px solid #CC5500; outline-offset: 2px; }
@media (max-width: 360px) {
  #screen-scorecard .sc-share-btn { height: 32px; padding: 0 9px 0 8px; font-size: 12px; }
}

/* v7.6.76 — Choose Tees: the shared page-wide "day to night" gradient
   background (css/10-style.css, #screen-tee > .screen-body) is sized to the
   FULL screen height and was leaving a large uniform navy block below the
   Select Tees button whenever content (now taller, with the Event section)
   didn't reach the bottom of the viewport — most visible on tall phones and
   desktop widths. Choose Tees is a light, card-based picker (like Course
   Manager), not a page that needs that dusk-to-night backdrop, so it gets a
   plain cream surface instead. Loads after css/10-style.css, so this wins at
   equal specificity. Scoped to #screen-tee only — no other screen's
   background changes. */
#screen-tee > .screen-body {
  background: var(--cream) !important;
}
/* v7.6.78 — CORRECTION: the fix above only overrode .screen-body's own
   background. #screen-tee (the outer .screen element) separately carries the
   tan/khaki "Standard Page System" nav-page gradient (css/01-style.css,
   --ps-nav-bg, id selector + !important) — a DIFFERENT background from a
   DIFFERENT rule. .screen-body normally fully covers it, but any edge — the
   safe-area padding zone on a notched device, a sub-pixel rounding gap — can
   still expose that gradient's darker lower stop as a visible strip. Overriding
   the outer element too (this file loads after css/01-style.css, so it wins at
   equal specificity) means there is no second background left to show through
   anywhere on this screen, matching content and edges alike. Verified with
   real-Chromium screenshots at mobile and desktop widths. */
#screen-tee {
  background: var(--cream) !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   v7.6.78 — GROUPS & TEAMS. Reuses the Events visual language (.cev-*
   overlay/sheet/nav classes) for the Groups & Teams page and its editor, and
   adds a compact checkbox-list style shared by: the Golf Buddy edit form's
   "Groups / Teams" field, the Group/Team editor's "Members" field, and Group
   Play setup's roster list.
   ═══════════════════════════════════════════════════════════════════════ */
.grp-check-list {
  display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto;
  border: 1.5px solid rgba(26,45,74,0.14); border-radius: 10px; padding: 6px 10px; background: #fffdf8;
}
.grp-check-row {
  display: flex; align-items: center; gap: 9px; padding: 7px 2px; font-size: 14px; color: #1a2d4a;
  font-family: 'DM Sans', sans-serif; cursor: pointer; border-bottom: 1px solid rgba(26,45,74,0.06);
}
.grp-check-row:last-child { border-bottom: none; }
.grp-check-row input[type="checkbox"] { width: 17px; height: 17px; accent-color: #CC5500; flex: 0 0 auto; }
.grp-empty-inline { padding: 10px 2px; font-size: 13px; color: var(--sage); }
.grp-row .course-item-info { color: var(--green-deep); opacity: 0.8; }

/* ── Group Play setup: compact Group/Team selector + roster ── */
.mp-grp-select-row { margin-top: 10px; }
.mp-grp-roster { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.mp-grp-roster-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px;
  border: 1.5px solid rgba(26,45,74,0.14); background: #fffdf8;
}
.mp-grp-roster-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: #CC5500; flex: 0 0 auto; }
.mp-grp-roster-name { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 700; color: #1a2d4a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-grp-roster-tee {
  flex: 0 0 auto; height: 32px; padding: 0 8px; border-radius: 7px; border: 1.5px solid rgba(26,45,74,0.3);
  background: #fff; color: #1a2d4a; font-family: 'DM Sans', sans-serif; font-size: 12.5px; font-weight: 700;
}
.mp-grp-empty { font-size: 13px; color: var(--sage); padding: 6px 2px; }

/* ── Event editor: Group/Team select replaces the old free-text input ── */
#cev-group-select { padding: 11px 14px; font-size: 15px; box-sizing: border-box; }
