/* Beach Club Billiards home page - the same dark billiard-club look as Break & Run:
   black surfaces, yellow accent, condensed uppercase headings, light body text. */

:root {
  --bg: #0b0b0b;
  --panel: #181818;
  --panel-2: #202020;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --muted: #959595;
  --accent: #ffbb35;
  --accent-2: #ff9f1a;
  --accent-ink: #0b0b0b;
  --red: #ff5c5c;
  --radius: 6px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  --head: "Fjalla One", "Oswald", "Arial Narrow", sans-serif;
  --body: "Heebo", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--body); font-weight: 300; min-height: 100vh; line-height: 1.6; font-size: 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--head); font-weight: 400; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 0.4em; line-height: 1.1; }
h2 { font-size: 1.45rem; }
.accent { color: var(--accent); }
p { margin: 0 0 0.75em; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
code { font-size: 0.9em; color: #dcdcdc; }
[hidden] { display: none !important; }

.page { max-width: 960px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }

/* Hero with the club logo */
.hero { padding: 1.25rem 0 1.75rem; }
.hero .logo-link { flex: 0 0 auto; line-height: 0; }
.brand-row { display: flex; align-items: center; gap: clamp(0.8rem, 3vw, 1.8rem); min-width: 0; }
.hero .logo { height: clamp(4rem, 12vw, 7rem); width: auto; max-width: min(20rem, 40vw); object-fit: contain; flex: 0 0 auto; }
.hero h1 { font-size: clamp(1.9rem, 5.6vw, 3.4rem); margin: 0; line-height: 1; }
.hero .tagline { margin: 0.5rem 0 0; color: var(--muted); font-size: 1.05rem; }

/* Cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }

/* The week: seven columns, day name over hours, notes listed underneath */
/* 1px gaps over a line-coloured background draw the cell borders at any column count. */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line-strong); border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.day { padding: 0.9rem 0.6rem; text-align: center; background: var(--panel); min-width: 0; }
.dname { font-family: var(--head); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.35rem; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.dhours { font-weight: 500; color: var(--text); font-size: 0.95rem; line-height: 1.3; }
.day.closed .dhours { color: var(--red); }
.day.today { background: rgba(255, 187, 53, 0.09); box-shadow: inset 0 3px 0 var(--accent); }
.day.today .dname { color: var(--accent); }
.notes { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.4rem; }
.notes li { color: var(--muted); padding: 0.5rem 0.75rem; border-left: 3px solid var(--line-strong); background: rgba(255, 255, 255, 0.02); }
.notes li b { font-family: var(--head); font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); margin-right: 0.5em; }
.notes li.today { border-left-color: var(--accent); }
.notes li.today b { color: var(--accent); }
.pill { display: inline-block; padding: 0.05em 0.5em; border-radius: 3px; font-family: var(--head); font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid rgba(255, 187, 53, 0.55); color: var(--accent); }

/* Upcoming events: date | day | time | title. Four rows show; the box scrolls for more. */
.events-scroll { border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.events-scroll.scrolls { overflow-y: auto; scrollbar-color: rgba(255, 187, 53, 0.6) var(--panel-2); scrollbar-width: thin; }
.events-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.events { list-style: none; margin: 0; padding: 0; }
.event { display: grid; grid-template-columns: 7rem 7rem 8rem 1fr; gap: 0.75rem; align-items: baseline; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); }
.events .event:last-child { border-bottom: 0; }
.edate { font-family: var(--head); font-size: 1rem; letter-spacing: 0.04em; color: var(--accent); white-space: nowrap; }
.eday { font-family: var(--head); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.etime { color: var(--text); font-weight: 500; }
.etitle { color: var(--text); font-weight: 400; min-width: 0; overflow-wrap: anywhere; }
.event.today { background: rgba(255, 187, 53, 0.09); box-shadow: inset 3px 0 0 var(--accent); }
.event.today .eday { color: var(--accent); }
.none { margin: 0; }

/* Editor still uses a table */
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; padding: 0.7em 0.6em; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { font-family: var(--head); color: var(--muted); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 400; }
tbody th { font-family: var(--head); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; width: 9rem; }
.table-wrap { overflow-x: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45em;
  padding: 0.75em 1.5em; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--panel-2); color: var(--text);
  font-family: var(--head); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; min-height: 2.6em; transition: transform 0.12s, filter 0.12s;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.15); text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; filter: none; transform: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.danger { background: transparent; border-color: rgba(255, 92, 92, 0.5); color: var(--red); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 0.45em 0.95em; font-size: 0.7rem; min-height: 2.1em; }
/* The grid of link buttons under the hours: boxy, see-through, yellow outline */
.btn.big {
  font-size: 0.95rem; padding: 1em 1.4em; white-space: normal; text-align: center; line-height: 1.25;
  border-radius: 3px; background: rgba(255, 187, 53, 0.06); color: var(--accent); border: 1px solid rgba(255, 187, 53, 0.6);
}
.btn.big:hover { background: rgba(255, 187, 53, 0.16); border-color: var(--accent); filter: none; }
.links { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 1.5rem; }
.links .btn { width: 100%; min-height: 3.6em; }

.foot { margin-top: 2.5rem; text-align: center; color: var(--muted); }

/* Editor */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 0.8rem 1.25rem; border-bottom: 1px solid var(--line); background: #000; }
.brand { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.brand .logo { height: 2.4rem; width: auto; max-width: min(10rem, 30vw); object-fit: contain; }
.brand h1 { font-size: 1.15rem; margin: 0; letter-spacing: 0.12em; }
.brand p { margin: 0; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }
label { display: block; font-family: var(--head); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0.9em 0 0.35em; }
input { width: 100%; padding: 0.7em 0.9em; border-radius: var(--radius); border: 1px solid var(--line-strong); background: #0e0e0e; color: var(--text); font: inherit; font-weight: 400; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 187, 53, 0.18); }
table.edit td { padding: 0.35em 0.4em; }
table.edit input { padding: 0.5em 0.7em; }
.row { display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 12rem; }
.row > .grow { flex: 2 1 18rem; }
.row > .shrink { flex: 0 0 auto; }
.link-row { padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.link-row:last-child { border-bottom: 0; }
.link-row.past { opacity: 0.55; }
.link-row.past:focus-within { opacity: 1; }
input[type="date"] { min-width: 10.5rem; color-scheme: dark; }
.dayout { display: block; min-width: 6.5rem; padding: 0.7em 0.2em; font-family: var(--head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); line-height: normal; }
.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-top: 1.1rem; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 20; background: #000; border: 1px solid var(--accent); color: var(--text); padding: 0.75em 1.4em; border-radius: 999px; box-shadow: var(--shadow); font-weight: 400; max-width: 90vw; }
.toast.err { border-color: var(--red); color: #ffc9c9; }

@media (max-width: 860px) {
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .page { padding: 1rem 1rem 2.5rem; }
  .brand-row { flex-direction: column; align-items: flex-start; }
  .week { grid-template-columns: 1fr; }
  .day { display: flex; justify-content: space-between; align-items: center; text-align: left; padding: 0.7rem 0.9rem; }
  .dname { margin: 0; flex-direction: row; gap: 0.5rem; }
  .day.today { box-shadow: inset 3px 0 0 var(--accent); }
  tbody th { width: auto; }
  /* Events stack: date and day on one line, time and title underneath. */
  .event { grid-template-columns: auto 1fr; gap: 0.15rem 0.6rem; }
  .edate { grid-row: 1; }
  .eday { grid-row: 1; align-self: baseline; }
  .etime { grid-column: 1 / -1; }
  .etitle { grid-column: 1 / -1; }
  .event .etime:empty { display: none; }
}

/* Main menu: one joined bar of outlined buttons (like the main Beach Club site), current page in solid yellow.
   League opens a drop-down. Below 720px the bar folds behind a Menu button. */
.brand-text { min-width: 0; flex: 1 1 auto; width: 100%; }
.menu { margin-top: 0.9rem; position: relative; }
.menu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.menu-list > li { position: relative; }
.menu-list > li > a, .sub-toggle {
  display: flex; align-items: center; gap: 0.45em; min-height: 2.6rem; padding: 0 1.1rem;
  font-family: var(--head); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); background: rgba(255, 187, 53, 0.06); border: 1px solid rgba(255, 187, 53, 0.45);
  border-radius: 0; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.menu-list > li + li > a, .menu-list > li + li > .sub-toggle { margin-left: -1px; }
.menu-list > li:first-child > a { border-radius: 4px 0 0 4px; }
.menu-list > li:last-child > a, .menu-list > li:last-child > .sub-toggle { border-radius: 0 4px 4px 0; }
.menu-list > li > a:hover, .sub-toggle:hover { position: relative; z-index: 1; color: #fff; background: rgba(255, 187, 53, 0.16); border-color: var(--accent); text-decoration: none; }
.menu-list > li > a.on, .has-sub.on > .sub-toggle { position: relative; z-index: 2; color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.menu-list a:focus-visible, .sub-toggle:focus-visible, .menu-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; z-index: 3; }
.caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; transition: transform 0.15s; }
.sub-toggle[aria-expanded="true"] .caret { transform: rotate(180deg); }
.sub {
  display: none; list-style: none; margin: 0; padding: 0.35rem 0; position: absolute; left: -1px; top: calc(100% + 4px); z-index: 30;
  min-width: 21rem; background: #111; border: 1px solid rgba(255, 187, 53, 0.45); border-radius: 4px; box-shadow: var(--shadow);
}
.sub.open { display: block; }
.sub a { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.65rem 1rem; color: var(--text); font-weight: 400; text-decoration: none; }
.sub a:hover { background: rgba(255, 187, 53, 0.12); color: var(--accent); text-decoration: none; }
.lock { font-size: 0.8em; opacity: 0.8; }
.menu-toggle { display: none; }
.bars, .bars::before, .bars::after { content: ""; display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: 0.2s; }
.bars::before { position: absolute; top: -6px; }
.bars::after { position: absolute; top: 6px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 0.7rem; min-height: 2.75rem; padding: 0 1.1rem;
    font-family: var(--head); font-size: 0.9rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--accent); background: rgba(255, 187, 53, 0.06); border: 1px solid rgba(255, 187, 53, 0.45); border-radius: 4px; cursor: pointer;
  }
  .menu-list { display: none; flex-direction: column; margin-top: 0.6rem; }
  .menu.open .menu-list { display: flex; }
  .menu-list > li + li > a, .menu-list > li + li > .sub-toggle { margin: -1px 0 0; }
  .menu-list > li > a, .sub-toggle { width: 100%; min-height: 3rem; font-size: 0.95rem; justify-content: space-between; border-radius: 0 !important; }
  .menu-list > li:first-child > a { border-radius: 4px 4px 0 0 !important; }
  .menu-list > li:last-child > a { border-radius: 0 0 4px 4px !important; }
  .sub { position: static; min-width: 0; margin: 0; border-radius: 0; border-top: 0; box-shadow: none; background: #0f0f0f; }
  .sub a { padding: 0.8rem 1.4rem; }
}

/* About page text and the passcode form */
.prose p { color: #d6d6d6; max-width: 46rem; }
.passcode-card { max-width: 34rem; }
.doc-name { color: var(--text); font-weight: 500; }
.passcode-row { display: flex; gap: 0.6rem; }
.passcode-row input { flex: 1; }
.form-error { color: #ffc9c9; border-left: 3px solid var(--red); padding: 0.5rem 0.75rem; background: rgba(255, 92, 92, 0.08); }
textarea { width: 100%; min-height: 12rem; padding: 0.7em 0.9em; border-radius: var(--radius); border: 1px solid var(--line-strong); background: #0e0e0e; color: var(--text); font: inherit; font-weight: 400; line-height: 1.5; resize: vertical; }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 187, 53, 0.18); }
.check { display: inline-flex; align-items: center; gap: 0.45rem; margin: 0; padding: 0.7em 0; text-transform: none; letter-spacing: 0; font-family: var(--body); font-size: 0.9rem; color: var(--text); white-space: nowrap; }
.check input { width: auto; accent-color: var(--accent); }

/* About page photos: a tidy grid, each opens full size in a new tab */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.photos figure { margin: 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.photos a { display: block; line-height: 0; }
.photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.2s; }
.photos a:hover img { transform: scale(1.03); }
.photos figcaption { padding: 0.55rem 0.75rem; color: #d6d6d6; font-size: 0.9rem; line-height: 1.4; }
@media (max-width: 600px) { .photos { grid-template-columns: 1fr 1fr; gap: 0.6rem; } }

/* Editor: menu builder and photo manager */
.menu-item { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0.4rem 0.9rem 0.9rem; margin-top: 0.9rem; background: rgba(255, 255, 255, 0.015); }
.menu-item .kids { margin: 0.4rem 0 0 1.4rem; padding-left: 0.9rem; border-left: 2px solid rgba(255, 187, 53, 0.35); }
.menu-item .kids .link-row { padding: 0.35rem 0; }
.menu-item .kid-note { margin: 0.6rem 0 0; }
.btn.icon { padding: 0.45em 0.7em; min-width: 2.2em; }
input:disabled { opacity: 0.45; }
.photo-list { display: grid; gap: 0.8rem; margin-top: 0.8rem; }
.photo-row { display: flex; gap: 0.9rem; align-items: center; flex-wrap: wrap; padding: 0.6rem; border: 1px solid var(--line); border-radius: var(--radius); }
.photo-row img { width: 7.5rem; height: 5.6rem; object-fit: cover; border-radius: 4px; flex: 0 0 auto; }
.photo-row .grow { flex: 1 1 14rem; }
.photo-row .grow label { margin-top: 0; }
.photo-row .btns { display: flex; gap: 0.4rem; }
