/* Cope Golf Alliance.
   Colours, fonts and proportions follow the organisation's Wix site:
   a cream header with the logo, a rounded menu bar, white pages and a tan
   footer. Futura (licensed through Wix) is replaced by Jost, a free face
   drawn on the same model. */

:root {
  --cream: rgb(242, 234, 218);
  --menu-bg: rgb(238, 232, 216);
  --menu-text: rgb(105, 105, 105);
  --text: rgb(47, 46, 46);
  --muted: rgb(114, 114, 114);
  --rule: rgba(204, 204, 204, 0.6);
  --footer: rgb(244, 234, 225);
  --navy: #282c6b;
  --red: #e84b4b;
  --yellow: #f4b331;
  --gold: rgb(188, 155, 93);
  --page: #ffffff;
  --ok: #2f6b3a;
  --ok-bg: #e7f2e8;
  --warn-bg: #fdf3dc;
  --err: #9b2b23;
  --err-bg: #fbe6e3;
  --club-1: #e3e5f3; /* Monkstown */
  --club-2: #fbe3e1; /* Cork */
  --club-3: #fdf0d2; /* Douglas */
  --club-4: #e2efe4; /* Muskerry */
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 300 16px/1.55 "Jost", "Futura", "Century Gothic", sans-serif;
}

a { color: var(--navy); }
a:hover { color: var(--red); }

h1, h2, h3 { font-weight: 300; line-height: 1.25; color: var(--text); }
h1 { font-size: 35px; margin: 0.2em 0 0.6em; }
h2 { font-size: 25px; margin: 1.4em 0 0.5em; }
h3 { font-size: 19px; margin: 1.2em 0 0.4em; font-weight: 400; }
strong, b { font-weight: 500; }

/* Demonstration banner */
.demo-banner {
  background: var(--navy);
  color: #fff;
  font-size: 14px;
  text-align: center;
  padding: 6px 16px;
}
.demo-banner a { color: #fff; }

/* Header */
.site-header {
  background: rgba(242, 234, 218, 0.96);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner { max-width: 1000px; margin: 0 auto; padding: 8px 16px 12px; }
.userbar {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  font-size: 14px;
  color: var(--menu-text);
  min-height: 22px;
}
.userbar a { color: var(--menu-text); text-decoration: none; }
.userbar a:hover { color: #000; text-decoration: underline; }
.logo { display: block; text-align: center; }
.logo img { width: 100%; max-width: 520px; height: auto; display: inline-block; }
.header-rule { border: 0; border-top: 1px solid var(--rule); margin: 8px 0 10px; }

/* Menu bar */
.menu { position: relative; }
.menu-toggle {
  display: none;
  width: 100%;
  border: 0;
  border-radius: 80px;
  background: var(--menu-bg);
  color: var(--menu-text);
  font: 400 15px "Jost", sans-serif;
  padding: 10px;
  cursor: pointer;
}
.menu > ul {
  list-style: none;
  margin: 0;
  padding: 5px;
  background: var(--menu-bg);
  border-radius: 80px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.menu li { position: relative; }
.menu a, .menu .label {
  display: block;
  padding: 8px 12px;
  color: var(--menu-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  border-radius: 80px;
  transition: background-color 0.4s ease, color 0.4s ease;
  white-space: nowrap;
}
.menu > ul > li > a:hover, .menu > ul > li:hover > a, .menu > ul > li:focus-within > a,
.menu a.current { background: rgba(242, 234, 218, 0.89); color: #000; }
.menu li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  list-style: none;
  margin: 0;
  padding: 6px 0;
  background: var(--menu-bg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 30;
}
.menu li ul a { border-radius: 0; padding: 7px 16px; }
.menu li ul a:hover { background: #fff; color: #000; }
.menu li:hover > ul, .menu li:focus-within > ul { display: block; }

/* Page */
.page { max-width: 980px; margin: 0 auto; padding: 28px 16px 56px; min-height: 50vh; }
.page.wide { max-width: 1200px; }
.lede { font-size: 18px; color: var(--muted); margin-top: -0.4em; }
.prose p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }

/* Messages */
.messages { list-style: none; padding: 0; margin: 0 0 20px; }
.messages li { padding: 10px 14px; border-radius: 4px; margin-bottom: 8px; background: var(--warn-bg); }
.messages .success { background: var(--ok-bg); color: var(--ok); }
.messages .error { background: var(--err-bg); color: var(--err); }
.notice { padding: 12px 16px; border-radius: 4px; background: var(--warn-bg); margin: 0 0 18px; }
.notice.ok { background: var(--ok-bg); }
.notice.err { background: var(--err-bg); color: var(--err); }
.notice.info { background: var(--cream); }

/* Buttons and forms */
.btn, button.btn, input[type=submit] {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  border: 0;
  border-radius: 80px;
  padding: 9px 20px;
  font: 400 15px "Jost", sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #1a1d4d; color: #fff; }
.btn.secondary { background: var(--menu-bg); color: var(--text); }
.btn.secondary:hover { background: var(--cream); color: #000; }
.btn.danger { background: var(--err); }
.btn.small { padding: 4px 14px; font-size: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }
.linklike { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; cursor: pointer; font: inherit; }

form .field { margin-bottom: 16px; }
form label { display: block; font-weight: 400; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date],
input[type=time], input[type=datetime-local], input[type=search], input[type=tel], select, textarea {
  font: 300 16px "Jost", sans-serif;
  padding: 8px 10px;
  border: 1px solid #c9c2b2;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  width: 100%;
  max-width: 460px;
}
textarea { max-width: 640px; }
.help { font-size: 14px; color: var(--muted); margin-top: 3px; }
.errorlist { list-style: none; padding: 0; margin: 4px 0 0; color: var(--err); font-size: 14px; }
.radio-list { list-style: none; padding: 0; margin: 0; }
.radio-list label { font-weight: 300; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.inline-form .field { margin: 0; }
.inline-form select, .inline-form input { width: auto; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; font-size: 15px; }
table.data th { text-align: left; font-weight: 500; background: var(--menu-bg); padding: 8px 10px; }
table.data td { padding: 7px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data tr.dim td { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Status tags */
.tag { display: inline-block; font-size: 13px; padding: 2px 10px; border-radius: 80px; background: var(--menu-bg); white-space: nowrap; }
.tag.not_open { background: #eee; color: #555; }
.tag.restricted { background: var(--warn-bg); color: #6b4c00; }
.tag.open { background: var(--ok-bg); color: var(--ok); }
.tag.closed { background: #e6e6e6; color: #444; }
.tag.paid { background: var(--ok-bg); color: var(--ok); }
.tag.unpaid { background: var(--err-bg); color: var(--err); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 16px 0; }
.card { border: 1px solid var(--rule); border-radius: 6px; padding: 16px 18px; background: #fff; }
.card h3 { margin-top: 0; }
.panel { background: var(--cream); border-radius: 6px; padding: 16px 20px; margin: 0 0 20px; }
.panel dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 16px; margin: 0; }
.panel dt { font-weight: 400; }
.panel dd { margin: 0; }

/* Timesheet */
.timesheet { border-collapse: collapse; width: 100%; font-size: 15px; }
.timesheet th { background: var(--menu-bg); font-weight: 500; text-align: left; padding: 8px; }
.timesheet td { border-bottom: 1px solid var(--rule); padding: 6px 8px; vertical-align: middle; }
.timesheet .time { font-size: 18px; font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }
.timesheet .club { font-size: 13px; white-space: nowrap; }
.club-chip { display: inline-block; padding: 1px 9px; border-radius: 80px; font-size: 13px; }
.club-1 { background: var(--club-1); }
.club-2 { background: var(--club-2); }
.club-3 { background: var(--club-3); }
.club-4 { background: var(--club-4); }
.timesheet .place { min-width: 150px; }
.timesheet .place.free { color: #aaa; }
.timesheet .place.unavailable { background: repeating-linear-gradient(45deg, #f4f4f4, #f4f4f4 6px, #fff 6px, #fff 12px); }
.timesheet .place.mine { background: #eef0fb; font-weight: 400; }
.timesheet .pin { color: var(--muted); font-size: 13px; }
.timesheet .action { text-align: right; white-space: nowrap; }
.timesheet tr.full td.action { color: var(--muted); font-size: 14px; }
.timesheet .withdraw { font-size: 13px; margin-left: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; margin: 8px 0 16px; }

@media (max-width: 760px) {
  .timesheet thead { display: none; }
  .timesheet, .timesheet tbody { display: block; }
  .timesheet tr {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2px 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
  }
  .timesheet td { border: 0; padding: 2px 4px; }
  .timesheet td.time { grid-row: 1; grid-column: 1; }
  .timesheet td.club { grid-row: 1; grid-column: 2; align-self: center; }
  .timesheet td.action { grid-row: 1; grid-column: 3; }
  .timesheet td.place { grid-column: 1 / -1; min-width: 0; }
  .timesheet td.place.free::before { content: "Free place"; }
  .timesheet td.place.unavailable { display: none; }
}

/* Fixtures */
.fixture-list { list-style: none; padding: 0; margin: 0; }
.fixture-list li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.fixture-list .date { font-weight: 400; }
.season-links { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 20px; font-size: 14px; }

/* News */
.news-item { border-bottom: 1px solid var(--rule); padding: 8px 0 18px; margin-bottom: 18px; }
.news-item h2 { margin-top: 0.4em; }
.news-item img { max-width: 100%; height: auto; border-radius: 4px; }

/* Emails shown in the demonstration */
.email { border: 1px solid var(--rule); border-radius: 6px; margin-bottom: 14px; background: #fff; }
.email header { background: var(--menu-bg); padding: 8px 14px; font-size: 14px; border-radius: 6px 6px 0 0; }
.email pre { margin: 0; padding: 12px 14px; white-space: pre-wrap; font: 300 15px/1.5 "Jost", sans-serif; }

/* Simulated checkout */
.checkout { max-width: 460px; margin: 0 auto; border: 1px solid var(--rule); border-radius: 8px; padding: 24px; }
.checkout .amount { font-size: 32px; font-weight: 400; margin: 8px 0 16px; }

/* Footer */
.site-footer {
  background: var(--footer);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
  padding: 22px 16px 26px;
  text-align: center;
  font-size: 14px;
  color: var(--text);
}
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 22px; margin-bottom: 8px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

/* Small screens */
@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .menu > ul { display: none; flex-direction: column; border-radius: 12px; margin-top: 8px; }
  .menu.open > ul { display: flex; }
  .menu li ul { position: static; display: block; box-shadow: none; padding: 0 0 4px 14px; background: transparent; }
  .menu a { border-radius: 8px; }
  h1 { font-size: 28px; }
  .site-header { position: static; }
}

/* Printing a timesheet */
@media print {
  .site-header, .site-footer, .demo-banner, .no-print, .btn-row { display: none !important; }
  .page { max-width: none; padding: 0; }
  .timesheet .action { display: none; }
  body { font-size: 12px; }
}

.stat { font-size: 32px; font-weight: 400; }
