
html,
body
{
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;

  background: white;
  font-family: Helvetica, sans-serif;
}

body
{
  min-height: 100vh;

  display: flex;
  flex-direction: column;

  overflow-y: scroll;
}

/* =========================================
   Typography baseline for Team Page
   - Team page uses 16px to match schedule/roster tables
   - Form controls inherit the same font settings
   ========================================= */
#team_page,
#team_page input,
#team_page select,
#team_page textarea {
  font-size: 16px;
  font-family: inherit;
}

/* =========================================================
   Hero Banner
   ========================================================= */

#hero_banner
{
  position: relative;
  width: 100%;
  height: 340px;
  overflow: hidden;
  background-color: #000;
}

#hero_image
{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* dark readability layer */
#hero_banner::after
{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  pointer-events: none;
}

#hero_overlay
{
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 900px;
  text-align: center;
  color: white;
  text-shadow: 0 3px 12px rgba(0,0,0,0.85);
  z-index: 2;
}

#hero_title
{
    margin: 0;

    font-size: 60px;
    font-weight: 900;

    letter-spacing: 2px;

    line-height: 1;

    text-shadow:
        0px 4px 14px rgba(0,0,0,0.75);
}

#hero_tagline
{
  margin-top: 22px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
}

.hero-white
{
    color: #FFFFFF;
}

.hero-gold
{
 		color: #F6B23C; 
}

/* Responsive */
@media screen and (max-width: 900px)
{
  #hero_banner { height: 280px; }
  #hero_overlay { top: 60px; }
  #hero_title { font-size: 48px; }
  #hero_tagline { font-size: 19px; }
}

@media screen and (max-width: 550px)
{
  #hero_banner { height: 220px; }
  #hero_overlay { top: 42px; }
  #hero_title
  {
    font-size: 36px;
    letter-spacing: 2px;
  }
  #hero_tagline
  {
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.3;
  }
}

/* =========================================================
   Site Footer
   ========================================================= */

#site_footer
{
    margin-top: auto;

    padding: 16px 20px;

    background-color: #2A52BE;
    color: white;

    text-align: center;
    font-size: 14px;
}

.footer-contact
{
    margin-top: 6px;
}

.footer-contact a
{
    color: white;
    text-decoration: none;
}

.footer-contact a:hover
{
    text-decoration: underline;
}

/* =========================================================
   Common Utilities and Page Visibility
   ========================================================= */

.small_font { font-size: 75%; color: purple; margin-bottom: 3px; }

#introduction { padding-bottom: 10px; margin-top: 20px; }
#team_page { display: none; margin-top: 15px; }
#nav_team_page { display: none; }
#nav_coach { display: none; }
#faq_page { display: none; }

.view-only { display: inline; }
.edit-only { display: none; }
.editing .view-only { display: none; }
.editing .edit-only { display: inline-block; }

/* Inline cell editing (coach draft edits) */
td.cell-editing .view-only { display: none !important; }
td.cell-editing .edit-only { display: inline-block !important; }
td.cell-editing textarea.edit-only { display: block !important; width: 100%; }

/* Make the Details editor feel more like inline editing (less conspicuous) */
#schedule_table td.details-cell textarea.edit-only {
  box-sizing: border-box;
  padding: 2px 4px;          /* minimal padding */
  border: none;              /* no inner box border; table cell already frames it */
  background: transparent;   /* blend into the cell */
  font: inherit;
  line-height: 1.2;
}

/* Provide a subtle focus cue without a heavy border */
#schedule_table td.details-cell textarea.edit-only:focus {
  outline: 1px solid rgba(0,0,0,0.25);
  outline-offset: 0px;
}

.draft-modified { background-color: #FFD580 !important; } /* match RSVP modified color */

/* Coach-only action bars: show in coach mode */
body.coach-mode #event_actions,
body.coach-mode #roster_actions { display: block !important; }
body.player-mode #event_actions,
body.player-mode #roster_actions { display: none !important; }

/* Delete column visible for coaches (no schedule/roster edit checkbox) */
body.coach-mode #schedule_table .delete-col,
body.coach-mode #roster_table .delete-col { display: table-cell !important; }
body.player-mode #schedule_table .delete-col,
body.player-mode #roster_table .delete-col { display: none !important; }

/* Editable affordance in coach mode */
body.coach-mode #schedule_table td.gp-cell:hover,
body.coach-mode #schedule_table td.date-cell:hover,
body.coach-mode #schedule_table td.start-time:hover,
body.coach-mode #schedule_table td.end-time:hover,
body.coach-mode #schedule_table td.details-cell:hover,
body.coach-mode #roster_table tbody td.name-cell:hover,
body.coach-mode #roster_table tbody td.name-cell:focus-within,
body.coach-mode #team_title:hover,
body.coach-mode #team_message_view:hover
{
  cursor: pointer;
  background-color: yellow;
}

/* Team title/message draft highlight */
#team_title.draft-modified,
#team_message_view.draft-modified,
#team_message_edit.draft-modified
{
  border-radius: 4px;
  padding-left: 6px;
  padding-right: 6px;
}

.section-title 
{
 font-size: 20px;
 font-weight: 600;
}

.page_title
{
 width: 100%;
 text-align: center; 
 font-size: 30px;
 font-weight: bold; 
}

.team-edit-toggle 
{
  font-size: 0.8em;
  color: #444;
}

/* player wrapper centers the whole control block */
#schedule_controls_player 
{
  display: flex;
  justify-content: center;
  margin-top: 25px;
  margin-bottom: 25px;
}

/* Controls container sizes itself to widest row */
#schedule_controls 
{
  display: grid;
  grid-template-columns: max-content;
  row-gap: 2px;
}

/* Each control row is left-aligned within that width */
#schedule_controls .control-row 
{
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Optional: consistent label column */
#schedule_controls .label 
{
  width: 70px;        /* adjust as needed */
  text-align: right;
  opacity: 0.9;
}

#schedule_controls .control-row {
  border-radius: 4px;
  padding: 2px 4px;
  border: 1px solid transparent;
  transition: background-color 0.12s ease-in-out, border-color 0.12s ease-in-out;
}

#schedule_controls .control-row:hover {
  background-color: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.15);
}

/* RSVP totals columns */
#schedule_table th.totals,
#schedule_table td.totals {
  width: 48px;
  min-width: 48px;
  text-align: center;
}

#schedule_table 
{
 table-layout: fixed;
}


/* Center align Day column */
#schedule_table .day-cell 
{
  text-align: center;
}


/* Add horizontal breathing room for the Event header */
#schedule_table th.gp-col 
{
 padding-left: 8px;
 padding-right: 8px;
}

input[type="checkbox"]
{
 margin-left: 0;
 padding-left: 0;
}


.table-wrapper 
{
 display: flex;
 justify-content: center;
 width: 100%;
}

li 
{
 padding-bottom: 5px;
 font-size: 16px;
}

.centered
{
 width: 100%;
 text-align: center; 
}

/* =========================================================
   Navigation
   ========================================================= */

#nav_menu 
{
 /*position: sticky; top: 0; */
 text-align: center;
 margin-left: auto;
 margin-right: auto;
 width: 100%;
 border: 0px solid black; 
 background-color: #2a52be;
}

.nav
{
 display: inline-block;
 color: white;
 height: 100%;
 padding: 10px 15px 10px 15px;
 font-size: 18px;
}

.nav:hover
{
 border-radius: 3px;
 cursor: pointer;
 background-color: #EE82EE;
}

.text_area 
{
 font-size: 18px;
 margin-left: auto;
 margin-right: auto;
 padding-top: 1px;
 width: 90%;
 max-width: 600px;
}

/* =========================================
   Editable field affordances (EDIT MODE)
   Applies to:
   - G/P select
   - Date input
   - Start / End time inputs
   - Details textarea
   Assumptions:
   - Table has id="schedule_table"
   - Edit mode adds class "editing" to the table
   - Editable controls have class "edit-only"
   ========================================= */

/* Base styling for all editable fields */
table.editing .edit-only 
{
 transition: background-color 0.15s ease-in-out;
 box-sizing: border-box;
 /*background-color: #F5F5F5;*/
}

/* Pointer cursor + yellow highlight on hover */
table.editing .edit-only:hover 
{
  cursor: pointer;
  background-color: yellow; 
}

/* Keep highlight while focused (typing/selecting) */
table.editing .edit-only:focus 
{
 cursor: pointer;
 background-color: yellow;
 outline: none;              /* optional: remove default focus ring */
}

/* Optional: prevent textarea resizing from breaking layout */
table.editing textarea.edit-only 
{
 resize: vertical;
 overflow: hidden;
}

/* Ensure view mode never shows pointer/yellow */
table:not(.editing) .edit-only 
{
 cursor: default;
 background-color: transparent;
}

/* Ensure edit inputs match table font size */

#roster_table td input[type="text"] {
  width: 100%;
  padding-left: 8px;
  padding-right: 8px;
  box-sizing: border-box;
}

.btn
{
 background-color: #2a52be;
 color: white;
 display: inline-block;
 text-align: center;
 text-decoration: none;
 border: 1px solid black;
 font-size: 16px;
 border-radius: 3px;
}

.btn:hover
{
 background-color: #DC143C;
 cursor: pointer;
 border-radius: 5px;
 text-decoration: none;
}


#btn_setup_team, #btn_example { padding: 15px 20px 15px 20px; }
#btn_delete_event { padding: 5px 10px; }
#btn_add_event { padding: 5px 10px; }
#btn_sort_by_date { padding: 5px 10px; }
#btn_add_player { padding: 5px 10px; }
#btn_delete_player { padding: 5px 10px; }
#btn_sort_roster { padding: 5px 10px; }

/* ==========================================================
   FAQ Page
   ========================================================== */

.faq__title
{
  text-align: center;
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 30px;
}

.faq-item
{
  margin-bottom: 14px;
}

.faq-item__heading
{
  margin: 0;
}

.faq-item__question
{
  appearance: none;
  -webkit-appearance: none;

  width: 100%;
  display: flex;
  align-items: center;

  margin: 0;
  padding: 6px 0;

  border: none;
  background: transparent;

  text-align: left;
  font: inherit;
  font-size: 18px;
  font-weight: 500;
  color: #222;

  cursor: pointer;
}

.faq-item__question:hover,
.faq-item__question[aria-expanded="true"]
{
  color: #1a0dab;
}

.faq-item__icon
{
  width: 22px;
  flex-shrink: 0;
  text-align: center;
}

.faq-item__question[aria-expanded="false"] .faq-item__icon::before
{
  content: "▸";
}

.faq-item__question[aria-expanded="true"] .faq-item__icon::before
{
  content: "▾";
}

.faq-item__answer
{
  margin: 6px 0 14px 22px;
  color: #2A52BE;
  line-height: 1.5;
}

.faq-item__answer p
{
  margin-top: 0;
  margin-bottom: 10px;
}

@media screen and (max-width: 550px)
{
  .faq__title
  {
    font-size: 26px;
  }

  .faq-item__question
  {
    font-size: 18px;
  }

  .faq-item__answer
  {
    font-size: 16px;
  }
}

/* Small screens */

@media screen and (max-width:550px)
{
  .faq__title
  {
    font-size: 26px;
  }

  .faq-item__question
  {
    font-size: 18px;
  }

  .faq-item__answer
  {
    font-size: 16px;
  }
}


.pair 
{
 margin-bottom: 30px;
}

.qn
{
 color: black;
 margin-bottom: 10px;
}

.an
{
 display: none;
 color: firebrick;
}
	
.qn:hover
{
 cursor: pointer;
 color: blue;
}

/* =========================================================
   Schedule and Roster Tables
   ========================================================= */

#schedule_table,
#roster_table
{
 margin-left: 0px;
 border-collapse: collapse;
}

#schedule_table { margin-left: auto; margin-right: auto; }
#roster_table { margin-left: auto; margin-right: auto; }

#schedule_table th, #schedule_table td, #roster_table th, #roster_table td { border: 1px solid black; }
#schedule_table th, #schedule_table td { text-align: center; }

#schedule_table td.start-time,
#schedule_table td.end-time {
  text-align: right;
  padding-right: 10px;
}

#roster_table th
{
 padding-left: 10px;
 padding-right: 10px; 
}
	
#roster_table td 
{
 padding-top: 4px;
 padding-bottom: 4px;
}

#roster_table tbody td.name-cell {
  padding-left: 8px;
}

#schedule_table td.rsvp-col:hover 
{
  cursor: pointer;
  background: yellow;
}

#schedule_table td.rsvp-col
{
 min-width: 110px;
}

#schedule_table td.rsvp-modified 
{
 background-color: #FFD580;  /* soft orange */
 transition: background-color 0.2s ease-in-out;
}

#schedule_table td
{
 padding: 5px 8px;
 font-weight: normal;
}

#schedule_table.editing td
{
 padding: 2px 6px;
 font-weight: normal;
}

#schedule_table thead th,
#roster_table thead th
{
 background-color: purple; 
 color: white;
 font-weight: normal;
}

/* Keep schedule header row height constant (prevents glyphs like ✓ from changing row height) */
#schedule_table thead th {
  height: 34px;
  line-height: 34px;
  padding-top: 0;
  padding-bottom: 0;
  white-space: nowrap;
  vertical-align: middle;
}


select
{
 background-color: #FCFFD8;
 padding: 3px 3px 3px 3px;
 font-size: 18px;
 text-align-last: center;
}

select:hover 
{ 
 cursor: pointer;
 background: yellow; 
}

/* https://blog.frankmtaylor.com/2012/01/23/html5-contenteditable-and-css/ */


/* Adjustments for smaller screen sizes */

/* =========================================
   Home screen / bookmark guidance section
   ========================================= */
#home_screen_help 
{
  margin: 8px auto 30px auto;  
  padding: 0;                  /* remove inner padding */
  max-width: 480px;
  font-size: 0.95em;
  color: #555;
}


/* Tighter spacing inside the help section */
#home_screen_help .pair { margin-bottom: 4px; }
#home_screen_help ol { margin-top: 8px; margin-bottom: 8px; }
#home_screen_help li { padding-bottom: 3px; }


/* Make delete column narrow and centered */
#schedule_table th.delete-col,
#schedule_table td.delete-col, #roster_table td.delete-col,
#roster_table th.delete-col,
#roster_table td.delete-col 
{
 width: 34px;
 text-align: center;
 padding-left: 6px;
 padding-right: 6px;
}

#schedule_table td.delete-col 
{
 cursor: pointer;
 padding-top: 0px;
 padding-bottom: 0px;
 line-height: 0;           /* prevents glyph/line-height from inflating row height */
 vertical-align: middle;
}

#schedule_table td.rsvp-col 
{
 background-color: #FCFFD8;
 min-width: 110px;
}

/* --- Add this directly below --- */
#schedule_table td.rsvp-col.rsvp-modified 
{
 background-color: #FFD580;  /* soft orange */
}

#schedule_table td.delete-col:hover, #roster_table td.delete-col:hover 
{
 background-color: yellow;
}

/* Circle toggle (pure CSS; no glyphs, no encoding issues) */
.del-toggle {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #666;
  box-sizing: border-box;
  vertical-align: middle;
  user-select: none;
  background-color: transparent;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.del-toggle.marked {
  background-color: darkred;
  border-color: darkred;
}

#schedule_table.editing .del-toggle:hover,
#roster_table.editing .del-toggle:hover {
  transform: scale(1.08);
}

/* Highlight entire row when marked for deletion (coach edit mode) */
#schedule_table.editing tr.row-marked-for-deletion td,
#roster_table.editing tr.row-marked-for-deletion td {
  background-color: #FFD580;  /* soft orange */
}

#schedule_table.editing tr.row-marked-for-deletion td:hover,
#roster_table.editing tr.row-marked-for-deletion td:hover {
  background-color: #FFD580;
}

/* -------------------------------------------------
   Hide RSVP selector in Coach Mode
------------------------------------------------- */

body.coach-mode #rsvp {
  display: none !important;
}

body.coach-mode #YesNoMaybe {
  display: none !important;
}

/* Newly added row highlight (bolder blue, fades over 3 seconds) */
@keyframes newRowFade {
  0% {
    background-color: #3D88FF;
  }
  50% {
    background-color: #3D88FF;  /* hold solid for first 3s */
  }
  100% {
    background-color: transparent;  /* fade out over last 3s */
  }
}

table tr.row-just-added:not(.row-marked-for-deletion) td {
  animation: newRowFade 2s ease forwards;
}


/* When coach is editing, the schedule view radios are disabled in JS.
   Give a subtle visual cue. */
#schedule_controls input[type="radio"]:disabled
{
  cursor: not-allowed;
  opacity: 0.6;
}


/* Pulse animation for the Sort by Date button when it first appears in Edit mode */
@keyframes sortPulse {
  0%   { transform: scale(1); box-shadow: 0 0 0 rgba(61,136,255,0); }
  40%  { transform: scale(1.06); box-shadow: 0 0 12px rgba(61,136,255,0.6); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(61,136,255,0); }
}

.btn.sort-pulse {
  animation: sortPulse 1.0s ease-out 2;
}


/* Roster RSVP detail columns (one column per event) */

#roster_table th.event-col div {
  margin-top: 3px;
}

#roster_table th.event-col div:first-child {
  margin-top: 1px;
}
#roster_table th.event-col {
  font-size: 0.82em !important;
  line-height: 1.15 !important;
}

#roster_table th.event-col .hdr-date {
  font-weight: 600;
}

#roster_table th.event-col .hdr-gp {
  font-weight: 700;
  font-size: 0.95em;
}

#roster_table td.event-col {
  font-size: 0.9em;
}

/* RSVP detail totals row */

#roster_table tr.yes-summary-row td
{
  background-color: purple;
  padding-left: 8px;
  color: white;
  font-weight: bold;
  border-top: 2px solid black;
}

/* Roster RSVP detail controls */
#roster_rsvp_mode label,
#roster_rsvp_controls label
{
  white-space: nowrap;
}


/* --- Tighter Roster RSVP Detail Columns --- */
#roster_table th.event-col,
#roster_table td.event-col {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  padding: 2px 2px !important;
}

#roster_table th.event-col {
  font-size: 0.72em !important;
  line-height: 1.05 !important;
}

#roster_table th.event-col .hdr-date {
  font-weight: 600;
}

#roster_table th.event-col .hdr-gp {
  font-weight: 700;
  font-size: 0.9em;
}

#roster_table td.event-col {
  font-size: 0.85em !important;
  padding: 3px 2px !important;
}


/* Home screen help heading (minimal link style; no triangle) */
#home_screen_help > .pair > .qn {
  text-align: center;
  cursor: pointer;
  color: #1a0dab;            /* classic link blue */
  font-weight: 500;
}

#home_screen_help > .pair > .qn:hover {
  text-decoration: underline;
}

/* Hide triangle indicator entirely */
#home_screen_help > .pair > .qn .toggle-icon {
  display: none;
}

.bottom_spacer {
  height: 50px;
}

/* =========================================
   Team name inline edit
   ========================================= */
#team_title[contenteditable="true"] {
  outline: none;
  border-bottom: 2px dotted rgba(0,0,0,0.35);
  padding-bottom: 2px;
}


/* =========================================
   Coach message under team name
   ========================================= */
#team_message_view {
  margin-top: 5px;
  margin-bottom: 15px;
  text-align: left;
  font-size: 1em;
  color: firebrick;
  font-weight: 600; 
  white-space: pre-wrap;   /* preserve line breaks */
}

#team_message_view.centered-message 
{
  text-align: center;
}

#team_message_edit {
  margin: 8px auto 10px auto;
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 52px;
  padding: 8px 10px;
  font-size: 0.9em;
  line-height: 1.25;
  resize: vertical;
}

/* Coach mode hover + focus affordance for message textarea */
body.coach-mode #team_message_edit:hover,
body.coach-mode #team_message_edit:focus {
  background-color: yellow;
  cursor: text;
  outline: none;
}

/* Coach mode: always show the coach message textarea so an empty message is still editable */
body.coach-mode #team_message_edit {
  display: block !important;
}
body.coach-mode #team_message_view {
  display: none !important;
}

#team_message_edit::placeholder {
  color: #666;
}


/* Publish / Discard bar */
#publish_bar
{
  text-align: center;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* =========================================================
   Mode Toggle and Publish Bar
   ========================================================= */

/* ------------------------ Mode toggle ------------------------ */

.mode-wrapper {
 text-align: center;
}

.mode-bar {
  display: inline-block;
  background: #f7f7f7;
  border: 1px solid #ddd;
  padding: 8px 10px;
  margin: 10px 0 14px 0;
  border-radius: 8px;
}

.mode-title {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.8px;
  color: #555;
  margin-bottom: 6px;
}


#mode_bar {
  margin-top: 0px;
  margin-bottom: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#mode_label {
  font-weight: bold;
}

#mode_toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mode-btn {
  border: 1px solid #555;
  background: white;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

.mode-btn.active {
  font-weight: bold;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.15) inset;
}

.mode-sep {
  font-weight: bold;
  user-select: none;
}

body.player-mode .coach-only {
  display: none !important;
}


/* ---------------- Updated column styling (class-based) ---------------- */

/* Date column (replaces nth-child rule) */
#schedule_table td.date-cell {
  text-align: left;
  padding-left: 10px;
  white-space: nowrap;
}

/* Prevent wrapping in date and time fields */
#schedule_table td.start-time,
#schedule_table td.end-time {
  white-space: nowrap;
}

/* =========================================================
   Coach Login Panel
   ========================================================= */

.coach-login-panel
{
    max-width: 460px;
    margin: 22px auto;
    padding: 24px 26px;

    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 10px;

    box-shadow: 0 2px 10px rgba(0,0,0,0.14);
}

.coach-login-title
{
    font-size: 1.35em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 22px;
}

.coach-login-description
{
    text-align: center;
    color: #444444;
    font-size: 1em;
    margin-bottom: 6px;
}

.coach-login-password
{
    width: 70%;
    display: block;
    margin: 0 auto;

    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 1em;

    border: 1px solid #999999;
    border-radius: 6px;
}

.coach-login-password:focus
{
    outline: none;
    border-color: #3366cc;
    box-shadow: 0 0 0 2px rgba(51,102,204,0.18);
}

.coach-login-error
{
    margin-top: 12px;
    color: #c00000;
    text-align: center;
    font-weight: bold;
}

.coach-login-buttons
{
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 14px;
}

.coach-login-buttons button
{
    min-width: 110px;
    padding: 7px 16px;
}

@media screen and (max-width: 900px) 
{	
  .text_area { font-size: 16px; }
  li { font-size: 15px; }
  .btn { font-size: 16px; flex: 30%; } 
}

@media screen and (max-width: 550px)
{
 .text_area { font-size: 14px; }
 li { font-size: 13px; }
 .long_label { display: none; }
 .btn { font-size: 13px; margin: 0px; padding: 10px 5px 10px 5px; }
 .nav { font-size: 15px; padding: 8px 8px; }
}

@media screen and (max-width: 400px) 
{
 .text_area { font-size: 12px; }
 .nav { padding: 5px 3px 5px 3px; }
 .btn { font-size: 12px; margin: 0px; padding: 10px 5px 10px 5px; }
 .nav { font-size: 14px; padding: 6px 5px; } 
}

@media screen and (max-width: 375px) 
{	
 .nav { font-size: 13px; padding: 5px 3px; }
}


/* Keep delete toggle centered without affecting row height */
#schedule_table td.delete-col .del-toggle {
  display: inline-block;
}

/* Left-align Schedule Details column (header + cells) */
#schedule_table th.details-col,
#schedule_table td.details-cell {
  text-align: left;
}

/* Roster alignment */
#roster_table th.name-col,
#roster_table td.name-cell {
  text-align: left;
}

#roster_table th.event-col,
#roster_table td.event-col {
  text-align: center;
}


/* =========================================
   Toast notifications (non-blocking)
   - Used instead of alert() for success/FYI/errors
   ========================================= */

.pmt-toast 
{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  
  bottom: auto;
  right: auto;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  min-width: 260px;
  max-width: 90%;
  padding: 16px 24px;
  border-radius: 10px;

  background-color: purple;
  color: white;

  box-shadow: 0 10px 25px rgba(0,0,0,0.35);

  z-index: 9999;

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.pmt-toast.show 
{
  opacity: 1;
  pointer-events: auto;
}

.pmt-toast.success { border-left: 10px solid #2e7d32; }
.pmt-toast.info    { border-left: 10px solid #1565c0; }
.pmt-toast.warn    { border-left: 10px solid #b26a00; }
.pmt-toast.error   { border-left: 10px solid #b00020; }

.pmt-toast .toast-title
{
  font-weight: bold;
  margin-right: 8px;
}

.pmt-toast .toast-close
{
  float: right;
  margin-left: 12px;
  cursor: pointer;
  font-weight: bold;
  user-select: none;
  opacity: 0.7;
}
.pmt-toast .toast-close:hover { opacity: 1; }


/* ---------------- Floating Popover Editor (Schedule: Details) ---------------- */
#cell_editor_popover {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 10px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
  padding: 6px;
  min-width: 280px;
  max-width: min(640px, 92vw);
}

#cell_editor_popover textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  border: none;
  outline: none;
  font: inherit;
  padding: 4px;
  box-sizing: border-box;
  background: transparent;
  line-height: 1.25;
}

td.popover-editing {
  background-color: rgba(0,0,0,0.06) !important;
}


#cell_editor_popover input[type="date"] {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font: inherit;
  border: none;
  outline: none;
  background: transparent;
}


#cell_editor_popover input[type="time"] {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font: inherit;
  border: none;
  outline: none;
  background: transparent;
}


.gp-pill{
  appearance:none;
  border:none;
  margin:0;
  padding:0 4px;
  font:inherit;
  font-size: 0.95em;
  line-height:1.2;
  background:transparent;
  color:inherit;
  cursor:pointer;
}

.gp-pill[aria-checked="true"]{
  font-weight:600;   /* selected */
}

.gp-pill[aria-checked="false"]{
  font-weight:400;   /* unselected */
}

.gp-pill:focus{
  outline:1px solid rgba(0,0,0,0.25);
  outline-offset:0;
}

/* If a gp-cell ever enters cell-editing, keep its text visible (no inline editor) */
#schedule_table td.gp-cell.cell-editing .view-only { display: inline !important; }

/* -------------------------------------------------
   Finalize section: password inputs
   - Max width 260px
   - Center horizontally
   We target all password inputs since the Finalize
   markup may be generated dynamically.
   ------------------------------------------------- */
input[type="password"] {
  width: 100%;
  max-width: 260px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;

  /* Helps when the parent is flex/grid */
  align-self: center;
  justify-self: center;
}


/* Password labels aligned with centered password fields */
.pw-field{
  max-width: 260px;        /* aligns with centered input max width */
  margin-left: auto;
  margin-right: auto;      /* centers the whole label+input block */
  text-align: left;        /* left-align the label within that block */
}

.pw-field input[type="password"]{
  width: 100%;
  text-align: center;      /* keep password text centered */
}


/* =========================================================
   Finalize Team Setup
   ========================================================= */
#finalize_panel{
  max-width: 620px;
  margin: 18px auto 0 auto;
  padding: 18px 16px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

#finalize_panel .finalize-title{
  margin-bottom: 10px;
}

#finalize_panel .finalize-help{
  max-width: 560px;
  margin: 0 auto 12px auto;
  color: rgb(68,68,68);
  line-height: 1.4;
  font-size: 16px;
}

#finalize_panel .finalize-help p{
  margin: 0 0 10px 0;
}

#finalize_panel .finalize-callout{
  max-width: 560px;
  margin: 10px auto 16px auto;
  padding: 10px 12px;
  border-left: 6px solid #b26a00;
  background: #fff7e6;
  border-radius: 8px;
  color: #3a2a00;
  line-height: 1.35;
}

#finalize_panel .finalize-bookmark{
  max-width: 560px;
  margin: 8px auto 4px auto;
  text-align: center;
  color: #444;
  font-size: 16px;
}

/* Password fields (label left-aligned to the centered inputs) */
#finalize_panel .pw-field{
  max-width: 360px;
  margin: 0 auto 14px auto;
  text-align: left;
}

#finalize_panel .pw-field label{
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #222;
}

#finalize_panel .pw-field input{
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.25);
  background: #f7f7f7;
  text-align: center;
}

#finalize_panel #btn_finalize_team{
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 17px;
}

#finalize_output{
  max-width: 560px;
  margin: 12px auto 0 auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: #ffe9e9;
  border: 1px solid rgba(176,0,32,0.25);
  color: #7a0016;
  line-height: 1.35;
}

/* Simple fade transitions (used when switching Finalize -> Success) */
.pmt-fade-out{
  opacity: 0;
  transition: opacity 0.32s ease;
}
.pmt-fade-in{
  opacity: 1;
  transition: opacity 0.32s ease;
}


/* === SUCCESS CARD (Updated for Symmetry Fix) === */

#success_card {
  width: fit-content;
  margin: 30px auto;  
  padding-top: 8px;
  padding-right: 20px;
  padding-bottom: 20px;
  padding-left: 20px;
  border-radius: 12px;
  box-sizing: content-box;
}

.success-title {
  text-align: center;
  font-weight: 600;
  font-size: 20px;
}

.success-header {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.success-row {
  display: flex;
  gap: 12px;
  align-items: stretch;   /* Ensures equal height */
  margin-bottom: 16px;
  justify-content: center;  /*center*/
}

/* Make BOTH input fields identical */
.success-row input {
  width: 250px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 14px;
  box-sizing: border-box;
 }

.success-row .success-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  width: auto;
 }

/* Success card action buttons */

#btn_open_team
{
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
}

/* === End Success Card Update === */

@media screen and (max-width: 550px)
{
  #schedule_table { font-size: 14px; } 
  
  #team_message_view,
  #team_message_edit
  {
    font-size: 0.9em;
  }
}
 

@media (max-width: 640px){
  #success_card .success-title{ font-size: 20px; }
}

@media (max-width: 640px)
{
  #success_card .success-row
  {
    flex-direction: column;
    align-items: center;
  }

  #success_card .success-row input
  {
    width: 100%;
    max-width: 280px;
  }

  #success_card .success-btn
  {
    width: auto;
    min-width: 110px;
    text-align: center;
  }
}

/* Left-align text inside finalize credential inputs */
#finalize_panel input[type="text"]{
  text-align: left;
}


/* During Create Team setup, suppress "modified vs baseline" orange highlights.
   In setup there is no meaningful baseline; keep only hover (yellow) affordances. */
body.setup-mode .draft-modified{
  background-color: transparent !important;
}
body.setup-mode #schedule_table td.rsvp-modified{
  background-color: transparent !important;
}
