/* =========================================================
   Ada Soccer Association, Ada, Ohio - Site Styles
   Primary color pulled from the club logo: a medium-dark purple
   ========================================================= */

:root {
  --purple: #6d3fa0;
  --purple-dark: #4f2d78;
  --purple-darker: #3a2059;
  --purple-light: #9b6fce;
  --purple-pale: #f2ecfa;
  --gold: #f2b632;
  --text: #262129;
  --text-light: #5a5266;
  --white: #ffffff;
  --off-white: #faf8fc;
  --border: #e3d9f0;
  --danger: #b3261e;
  --danger-bg: #fbe9e7;
  --success: #1e6b3f;
  --success-bg: #e7f5ec;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(76, 40, 120, 0.12);
  --shadow-lg: 0 10px 30px rgba(76, 40, 120, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--off-white);
  line-height: 1.6;
}

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4 {
  color: var(--purple-darker);
  line-height: 1.25;
  font-weight: 700;
}

a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-dark); text-decoration: underline; }

img { max-width: 100%; display: block; }

/* ---------- Top bar ---------- */
.top-bar {
  background: var(--purple-darker);
  color: #e8ddf5;
  font-size: 0.85rem;
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 20px;
}
.top-bar a.social-link {
  color: #f4d9ff;
  font-weight: 600;
}
.top-bar a.social-link:hover { color: var(--white); }
.top-bar-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.top-bar-links a {
  color: #e8ddf5;
}
.top-bar-links a:hover { color: var(--white); }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 8px;
  padding: 12px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand .logo {
  height: 56px;
  width: auto;
}
.brand-text {
  font-weight: 800;
  color: var(--purple-darker);
  font-size: 1.05rem;
  line-height: 1.2;
}

.main-nav > ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  align-items: center;
}
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  display: block;
  padding: 12px 14px;
  color: var(--text);
  font-weight: 600;
  border-radius: var(--radius);
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
  background: var(--purple-pale);
  color: var(--purple-dark);
  text-decoration: none;
}
.main-nav .btn-nav {
  background: var(--purple);
  color: var(--white) !important;
}
.main-nav .btn-nav:hover { background: var(--purple-dark); }

/* "Sign Up for Updates" pill - lives in the top bar next to the Facebook
   link, outside the main nav/header row entirely, so it never crowds or
   wraps the logo or the hamburger menu on mobile. Gold so it still stands
   out against the dark top bar. */
.header-cta {
  display: inline-block;
  background: var(--gold);
  color: var(--purple-darker) !important;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 30px;
  text-decoration: none;
  white-space: nowrap;
}
.header-cta:hover, .header-cta.active { background: #d99f1f; color: var(--purple-darker) !important; text-decoration: none; }

.dropdown {
  display: none;
  position: absolute;
  /* Flush against the parent link (no margin-top gap) so the mouse never
     crosses a "dead zone" that would break :hover on the way down to it. */
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius);
  padding: 8px;
  list-style: none;
  margin: 0;
}
/* Invisible bridge that keeps the parent :hover active while the cursor
   travels from the nav link down into the dropdown. */
.has-dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  display: block;
}
.dropdown li a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text);
  font-weight: 500;
}
.dropdown li a:hover {
  background: var(--purple-pale);
  color: var(--purple-dark);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--purple-darker);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple));
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}
.hero h1 {
  color: var(--white);
  font-size: 2.4rem;
  margin: 0 0 12px;
}
.hero p {
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 24px;
  color: #f0e6fb;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
}
.btn-primary {
  background: var(--gold);
  color: var(--purple-darker);
}
.btn-primary:hover { background: #d99f1f; color: var(--purple-darker); text-decoration: none; }
.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.15); color: var(--white); text-decoration: none; }
.btn-solid {
  background: var(--purple);
  color: var(--white);
}
.btn-solid:hover { background: var(--purple-dark); color: var(--white); text-decoration: none; }
/* For destructive/secondary actions on white cards (portal pages) - .btn-outline
   is white-on-transparent and meant for the purple hero, so it disappears on
   white backgrounds. Use this instead for Reject/Remove/Delete buttons. */
.btn-danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}
.btn-danger:hover { background: var(--danger-bg); color: var(--danger); text-decoration: none; }

/* ---------- Sections / Cards ---------- */
.section { padding: 50px 0; }
.section-alt { background: var(--white); }
.section-title {
  text-align: center;
  margin-bottom: 8px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-light);
  max-width: 620px;
  margin: 0 auto 36px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

/* Fixed 3-across layout (used on the Fields & Directions page) - collapses to
   2 columns on tablets and 1 column on phones so it still looks good everywhere. */
.card-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 860px) {
  .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .card-grid.cols-3 { grid-template-columns: 1fr; }
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }

.badge {
  display: inline-block;
  background: var(--purple-pale);
  color: var(--purple-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}

.placeholder-note {
  background: #fff8e6;
  border: 1px dashed #e0b64a;
  color: #7a5b00;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  margin: 18px 0;
}

/* ---------- Board members ---------- */
.board-member {
  text-align: center;
}
.board-member .avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--purple-pale);
  border: 3px solid var(--purple-light);
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--purple-dark);
  font-size: 1.6rem;
}
.board-member h3 { margin: 0 0 2px; }
.board-member .role {
  color: var(--purple);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
th {
  background: var(--purple);
  color: var(--white);
}
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--purple-pale); }
.table-wrap { overflow-x: auto; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  max-width: 760px;
  margin: 0 auto;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--purple-darker);
}
.required { color: var(--danger); }
input[type=text], input[type=email], input[type=tel], input[type=date],
input[type=password], input[type=file],
select, textarea {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  line-height: normal;
  font-family: inherit;
  margin-bottom: 18px;
  background: var(--off-white);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--purple);
  background: var(--white);
}
textarea { min-height: 130px; resize: vertical; }
fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  padding: 16px 18px;
}
legend {
  font-weight: 700;
  color: var(--purple-dark);
  padding: 0 8px;
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 18px;
}
.checkbox-row input { width: auto; margin: 4px 0 0; }
.checkbox-row label { font-weight: 500; margin: 0; }

/* honeypot field - hidden from real users, visible to bots that fill everything */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 22px;
  font-weight: 600;
}
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #b7ddc4; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #e6b3ae; }

/* Board-only highlighted reference box (e.g. shared mailbox credentials) -
   gold border/background so it stands out from ordinary dashboard cards. */
.board-highlight-box {
  background: #fff8e6;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.board-highlight-box h3 {
  margin: 0 0 8px;
  color: var(--purple-darker);
  font-size: 1rem;
}
.board-highlight-box code {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.95rem;
}

/* ---------- Sponsorship tiers ---------- */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.tier-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.tier-card.featured {
  border-color: var(--gold);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.tier-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--purple);
  margin: 6px 0 14px;
}
.tier-card ul {
  text-align: left;
  padding-left: 20px;
  color: var(--text-light);
}

/* ---------- Affiliation badge (footer) ---------- */
.affiliation-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #e8ddf5;
}
.affiliation-badge img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
}
.affiliation-badge span { font-size: 0.85rem; }
.affiliation-badge:hover span { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--purple-darker);
  color: #d8c9ec;
  padding: 44px 0 0;
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  padding-bottom: 30px;
}
.footer-logo { height: 60px; margin-bottom: 10px; }
.footer-col h4 { color: var(--white); margin-top: 0; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #d8c9ec; }
.footer-links a:hover { color: var(--white); }
.footer-social { font-weight: 600; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 16px 20px;
  font-size: 0.85rem;
  text-align: center;
}
.footer-bottom a { color: #d8c9ec; }
.footer-bottom a:hover { color: var(--white); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-light { color: var(--text-light); }
.mt-0 { margin-top: 0; }
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.map-embed {
  border: 0;
  width: 100%;
  height: 260px;
  border-radius: var(--radius);
}

/* ---------- Portal (login/board/coach/referee/volunteer area) ---------- */
.webmail-box {
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--purple-pale);
  border-radius: var(--radius);
  text-align: center;
}
.webmail-box strong { display: block; margin-bottom: 4px; color: var(--purple-darker); }

.portal-role-badge {
  display: inline-block;
  background: var(--purple-pale);
  color: var(--purple-dark);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
}

/* Unmissable bar shown whenever the owner is using "View As" - always gold,
   never confused with normal portal chrome, so it's obvious this isn't a
   normal logged-in session. */
.view-as-banner {
  background: var(--gold);
  color: var(--purple-darker);
  position: sticky;
  top: 0;
  z-index: 99;
}
.view-as-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 20px;
  font-weight: 600;
}
.view-as-banner-inner form { margin: 0; }

.portal-table { margin-bottom: 24px; }

/* Editable player list on the roster-edit page - a CSS "table" built from
   divs (not a real <table>) so each row can be its own <form> without
   producing invalid HTML (a <form> can't legally wrap table cells). */
.player-table {
  display: table;
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.player-row {
  display: table-row;
}
.player-row-head { display: table-row; font-weight: 700; background: var(--purple); color: var(--white); }
.player-cell {
  display: table-cell;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.player-row-head .player-cell { border-bottom: none; }
.player-cell input[type=text] { margin-bottom: 0; }
.player-cell-narrow { width: 110px; }
.player-cell-actions { width: 160px; white-space: nowrap; }

/* ---------- Schedules (public page + coach schedule tool) ---------- */
/* A practice/game whose date+time is already in the past. */
.event-past, .event-past a {
  text-decoration: line-through;
  color: var(--text-light);
}
.event-past .tag-cancelled, .event-past .tag-rescheduled { text-decoration: none; }

.tag-cancelled, .tag-rescheduled {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.tag-cancelled { background: var(--danger-bg); color: var(--danger); }
.tag-rescheduled { background: #fff3cd; color: #7a5b00; }
.tag-upcoming { background: var(--success-bg); color: var(--success); }
.tag-completed { background: #e9e9ec; color: var(--text-light); }
.status-note { display: block; font-size: 0.82rem; color: var(--text-light); font-style: italic; margin-top: 2px; }

.schedule-team-heading {
  margin-top: 36px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--purple-pale);
}
.schedule-subheading { margin: 14px 0 6px; font-size: 1rem; color: var(--purple-dark); }

/* Quick-Add Multiple Games/Practices grid (portal/schedule.php) - fixed
   column widths (see the <colgroup> in the page) so the table fits the
   card's width instead of forcing a horizontal scrollbar, with smaller
   inputs/spacing than the rest of the site so 10 rows stays manageable. */
.bulk-grid { table-layout: fixed; }
.bulk-grid th, .bulk-grid td { padding: 6px 8px; }
.bulk-grid input, .bulk-grid select {
  padding: 7px 8px;
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.bulk-grid td:last-child input, .bulk-grid td:last-child select { margin-bottom: 6px; }
.bulk-grid td:last-child input:last-child { margin-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav > ul {
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
  }
  .dropdown {
    display: block;
    position: static;
    box-shadow: none;
    padding-left: 14px;
  }
  .has-dropdown:hover .dropdown { display: block; }
  .hero { padding: 44px 0; }
  .hero h1 { font-size: 1.9rem; }
  .top-bar-inner { flex-direction: column; gap: 4px; text-align: center; }
  .top-bar-links { flex-wrap: wrap; justify-content: center; gap: 10px 16px; }
}

@media (max-width: 600px) {
  .brand-text { font-size: 0.9rem; }
  .brand .logo { height: 44px; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 1rem; }
  .section { padding: 34px 0; }
  .tier-card.featured { transform: none; }
  .card-grid, .tier-grid { grid-template-columns: 1fr; }
  .form-card { padding: 20px 16px; }
  th, td { padding: 9px 8px; font-size: 0.9rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; text-align: center; }
}