
/* ===========================
   GLOBAL STYLES
=========================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');

body {
  font-family: 'Poppins', sans-serif;
  margin: 20px;
  color: #222;
}

#content {
    margin-top: 150px; /* adjust based on banner height */
}
@media (max-width: 768px) {
    #content { margin-top: 180px; } /* more space for wrapped banner */
}

/* ===========================
   BUTTONS & TITLE BOXES
=========================== */

/* Generic button styling */
.button {
  font-family: 'Poppins', sans-serif;
  margin: 12px 6px;          
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.3em;
  background-color: #007bff;  /* default */
  color: white !important;     /* force white text */
  border: 2px solid #00305B;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
  display: inline-block;
}

.button:hover {
  background: #00305B;
  transform: scale(1.05);
}

/* --- Modifier classes --- */
.home-button,
.top-banner .nav-link,       /* ensure top-banner buttons are white */
#qualifying-btn, #qualifying-times-btn,
#records-btn {
  background-color: #004080;  /* blue for nav/home */
  color: white !important;    /* force white text */
  border: 2px solid #00305B;
}

.nav-button {
  background-color: #82BE1F; /* green */
  border-color: #00305B;
  color: white !important;
}

.report-button { margin: 12px 16px; }

.nav-button-group {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

/* Responsive dropdown buttons */
@media (max-width: 220px) {
    #qualifying-btn, #qualifying-times-btn,
    #qualifying-dropdown, #qualifying-times-dropdown,
    #records-btn, #records-dropdown {
        width: 100%;
    }
}

#qualifying-btn, #qualifying-times-btn,
#qualifying-dropdown, #qualifying-times-dropdown{
    width: 240px;
}

#records-btn, #records-dropdown {
    width: 200px;
}

/* ===========================
   CALENDAR STYLES
=========================== */
.calendar-header {
  display: block;
  margin: 20px auto;
  padding: 12px 24px;
  font-size: 32px;
  font-weight: bold;
  border-radius: 16px;
  background: #82BE1F;
  color: white;
  text-align: center;
  border: 2px solid black;
  width: fit-content;
}

table.month {
  width: 100%;
  max-width: 100%;
}

td.meet-cell {
  border: 2px solid black;
  max-width: 120px;
  color: white;
  padding: 4px;
}

.meet-link {
  color: white;
  font-weight: bold;
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 6px;
  display: inline-block;
  transition: background 0.12s, transform 0.12s;
}
.meet-link:hover { background: rgba(0,0,0,0.15); transform: scale(1.02); }

.meet-no-link {
  font-weight: normal;
  color: inherit;
  text-decoration: none;
  display: inline-block;
}

/* ===========================
   TABLE STYLES
=========================== */
table {
  border-collapse: collapse;
  margin: 20px auto;
  width: 100%;
  max-width: 1000px;
}

th, td {
  border: 1px solid #ddd;
  padding: 6px 10px;
  text-align: center;
  vertical-align: middle;
  font-size: 1em;
}

th { background-color: #333; color: white; }

/* Sex-specific coloring */
.male { background-color: #cce5ff; }
.female { background-color: #f8d7da; }
.sex-row-male th, .stroke-row-male th { background-color: #cce5ff; color: #000; font-weight: 700; }
.sex-row-female th, .stroke-row-female th { background-color: #f8d7da; color: #000; font-weight: 700; }

/* Special highlighting */
.missing-time { color: red; font-weight: bold; }
.result-time { font-style: italic; color: #333; }

/* ===========================
   SWIMMER LIST / EVENTS
=========================== */
.title-age { font-size: 2.2em; font-weight: bold; color: #333; margin-bottom: 10px; }
.swimmer-wrapper { margin: 12px 0; display: flex; align-items: center; }
.events { display: none; margin-left: 60px; font-size: 1.3em; }
.events ul { margin: 5px 0 10px 20px; font-size: 1.3em; }

.swimmer-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 2em;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    cursor: pointer;
    font-weight: bold;
    color: #333;
    transition: background 0.15s, transform 0.15s;
}
.swimmer-button.Male { background-color: #cce5ff; }
.swimmer-button.Female { background-color: #f8d7da; }
.swimmer-button:hover {border: 2px solid #000; transform: scale(1.03); }

.arrow { display: inline-block; transition: transform 0.2s; }
.swimmer-button.open .arrow { transform: rotate(90deg); }

.name { font-family: 'Poppins', sans-serif; font-size: 1em; font-weight: 600; color: #333; }

.top-banner {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    gap: 15px;
    background-color: #004080;
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Banner nav links */
.top-banner .nav-link {
    background-color: #004080;
    border: 2px solid #00305B;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: bold;
    color: white !important;  /* force white text */
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}
.top-banner .nav-link:hover {
    background-color: #0066cc;
    transform: scale(1.05);
}

/* Dropdown buttons */
.dropbtn {
    font-family: 'Poppins', sans-serif;
    background-color: #004080;
    color: white !important;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    min-width: 240px;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.2s, transform 0.2s;
}
.dropbtn:hover { background-color: #0066cc; transform: scale(1.05); }
.dropbtn .arrow { margin-right: 6px; }
.dropbtn.open .arrow { transform: rotate(90deg); }

/* Dropdown content */
.dropdown-content, .dropdown-item {
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #82BE1F;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 14px;
}
.dropdown-item {
    color: white;
    padding: 10px;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.2s, transform 0.2s;
}

.dropdown-item:hover { background-color: #0066cc; transform: scale(1.03); }

/* Remove fixed widths */
#eligibility-btn,
#qualifying-times-btn,
#qualifying-btn,
#records-btn {
  min-width: unset;   /* allow natural sizing */
  width: auto;        /* scale to content */
  text-align: center; /* center text */
}

/* Scale ALL banner buttons equally */
.top-banner .nav-link,
.dropbtn {
    font-size: 20px;   /* bigger text */
    padding: 14px 28px;    /* same spacing */
    border-radius: 14px;
}

/* ===========================
   MEET TITLE BOX
=========================== */
.meet-title-box {
    display: block;
    background-color: #00305B;
    color: white;
    font-size: 28px;
    font-weight: bold;
    padding: 12px 20px;
    border-radius: 12px;
    border: 2px solid #000000;
    margin: 10px auto;
    text-align: center;
    max-width: fit-content;
}
.toggle-notice {
    font-weight: bold;
    color: #c00;  /* red text */
    margin: 10px 0;
}
.banner-logo {
    height: 80px;
    width: auto;
    margin-left: auto;   /* keeps it pushed to the right */
    margin-right: 80px;  /* move it left by 20px from edge */
}
#qualifying-btn:hover,
#qualifying-times-btn:hover,
#eligibility-btn:hover,
#records-btn:hover {
    background-color: #0066cc;  /* lighter blue */
    transform: scale(1.05);
}
/* === HOME PAGE CONTROLS & CARD STYLES === */
.controls-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  margin: 18px auto;
  max-width: 1000px;
  padding: 8px;
  flex-wrap: wrap;
}
.controls-bar .search { flex: 1 1 320px; max-width: 480px; }
.controls-bar input[type="search"] {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 1rem;
}
.controls-bar .toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

.age-group { max-width: 1000px; margin: 8px auto 16px auto; }
.title-age { display:flex; align-items:center; gap:12px; font-size:1.6rem; margin:6px 0; }
.age-badge {
  background: #82BE1F;
  color: #002644;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}

.swimmer-card {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 14px; margin:8px auto; max-width:1000px;
  background:#fff; border-radius:12px; border:1px solid rgba(0,0,0,0.06);
  box-shadow:0 6px 18px rgba(2,6,23,0.03); transition: transform .12s, box-shadow .12s;
}
.swimmer-card:hover { transform: translateY(-3px); box-shadow:0 10px 22px rgba(2,6,23,0.06); }
.swimmer-card .left { display:flex; align-items:center; gap:12px; }
.swimmer-button { display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:10px; font-size:1.05rem; border:1px solid #ddd; background:#f8f8f8; cursor:pointer; }
.swimmer-button:focus, .swimmer-button:hover { transform: scale(1.03); outline: none; }

.meta { display:flex; flex-direction:column; gap:2px; }
.meta .name { font-weight:700; font-size:1.05rem; color:#111; }
.meta .sub { color:#666; font-size:0.95rem; }

.events { display:none; max-width:1000px; margin:6px auto 18px auto; background:#fff; padding:12px 16px; border-radius:10px; border:1px solid rgba(0,0,0,0.05); box-shadow:0 6px 14px rgba(2,6,23,0.02); }

.title-total { display:inline-block; padding:14px 22px; border-radius:12px; background:#82BE1F; color:#002644; font-weight:800; margin:26px auto; border:2px solid #00305B; }
/* ===========================
   REPORT PAGE STYLING (additional)
   - cards/tables, filtering, "close" highlight
=========================== */

.report-controls input[type="search"]{
  font-size: 1rem;
  box-shadow: 0 3px 10px rgba(2,6,23,0.04);
}

.report-table {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(2,6,23,0.02);
}

.report-table thead th{
  background:#0b3b5b;
  color:#fff;
  font-weight:700;
  padding:10px 12px;
  text-align:center;
  font-size:0.95rem;
  border-bottom: 2px solid rgba(0,0,0,0.06);
}

.report-table tbody td{
  padding:8px 10px;
  font-size:0.98rem;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.age-badge {
  background: #82BE1F;
  color: #002644;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}

/* red when missing times */
.missing-time {
  color: #c00;
  font-weight: 700;
}

/* close seed (slower than qualifying) */
.close-time {
  color: #c00;
  font-weight: 800;
  background: rgba(255,200,200,0.06);
  padding: 2px 6px;
  border-radius: 0;   /* no rounding */
}


/* day-row special */
.day-row td {
  background: #f6f6f6;
  font-weight: 700;
  color: #222;
}

/* ineligible rows muted */
.ineligible { opacity: 0.65; }
/* ===========================
   JX Award Labels
=========================== */
.jx {
  margin-left: 6px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.9em;
}

/* Color Variants */
.jx.blue {
  color: #00AEEF;
}

.jx.bronze {
  color: #B77B4E;
}

.jx.silver {
  color: #AAAAAB;
}

.jx.gold {
  color: #D3AA4E;
}
/* Restrict single-age-group tables and align them side by side */
.side-by-side-tables {
  display: flex;
  justify-content: center;  /* keep them centered together */
  align-items: flex-start;   /* align the top edges */
  flex-wrap: wrap;           /* allows wrapping on small screens */
}

table.restricted {
  max-width: 500px;             /* whatever you prefer */
  margin: 0;                    /* remove extra auto margins */
}
/* ==============================
   RECORD SIDEBAR BUTTONS
============================== */
/* ===========================
   PAGE WRAPPER
=========================== */
.record-page-wrapper {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

/* ===========================
   MAIN CONTENT
=========================== */
.main-content {
    flex: 1;
    min-width: 600px;
}

/* ===========================
   LEFT SIDEBAR (FIXED)
=========================== */
.record-sidebar-left {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.record-sidebar-left a {
    background: #007bff;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    display: block;
    text-align: center;
    width: 140px;
    transition: 0.2s;
}

.record-sidebar-left a.active {
    background: #0056b3;
}

.record-sidebar-left a:hover {
    filter: brightness(0.85);
    cursor: pointer;
}

/* ===========================
   RIGHT SIDEBAR (SCROLLS WITH PAGE)
=========================== */
.record-right-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 120px;
    flex-shrink: 0;
}

.sidebar-age-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.record-right-sidebar a {
    background: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    text-align: center;
    min-width: 60px;
    transition: 0.2s;
}

.record-right-sidebar a:hover {
    filter: brightness(0.85);
    cursor: pointer;
}

.record-right-sidebar a.return-top {
    margin-top: 12px;
    background: #007bff;
}

/* ===========================
   TABLES AND CONTENT
=========================== */
.report-table, .record-group, .report-controls, .meet-title-box {
    width: 100%;
}
