/* === gaming_style.css === */

/* 1. Normalize typography and body baseline */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #333;
  background-color: #f7f9fa;
  margin: 0;
  padding: 20px;
}

/* 2. Container Box Layout */
.dashboard-container {
  max-width: 760px;
  margin: 0 auto;
  background: #ffffff;
  padding: 20px;
  border: 1px solid #e1e4e6;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 3. Modernize Text input fields */
input[type="text"]#game_search {
  width: 280px;
  padding: 8px 12px;
  font-size: 15px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s ease-in-out;
}

input[type="text"]#game_search:focus {
  border-color: #2d7a47;
  box-shadow: 0 0 0 3px rgba(45, 122, 71, 0.15);
}

/* === Form & Action Buttons Row Layout === */

.action-row {
  display: flex;         /* Forces elements to line up horizontally side-by-side */
  align-items: center;   /* Perfectly centers items vertically on the line */
  gap: 8px;              /* Standard clear space gap between elements */
  margin: 15px 0;
  width: 100%;
}

/* Ensure the text box, grey button, and green button have matching baseline properties */
input[type="text"]#game_search,
.btn-primary,
.btn-suggestions {
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
  height: 32px;          /* Locks vertical thickness so everything matches perfectly */
}

/* Search input box */
input[type="text"]#game_search {
  width: 220px;
  padding: 4px 10px;
  border: 1px solid #767676;
  border-radius: 2px;
}

/* Classic crisp gray Submit button */
.btn-primary {
  background-color: #f0f0f0;
  color: #000000;
  border: 1px solid #767676;
  padding: 0 14px;
  border-radius: 2px;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #e5e5e5;
}

/* Kuner Green Suggestions button */
.btn-suggestions {
  background-color: #2d7a47; 
  color: #ffffff;
  border: 1px solid #235f37;
  padding: 0 16px;
  font-weight: bold;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;  /* FIX: Prevents text from splitting onto multiple rows */
}

.btn-suggestions:hover {
  background-color: #235f37;
}

.btn-sort {
  background-color: #ffffff;
  color: #555555;
  border: 1px solid #d1d5db;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 15px;
}

.btn-sort:hover {
  background-color: #f9fafb;
}

/* 5. Clean Flex Grid Layout hooks */
.action-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
}

/* === Calendar Adjustments === */

/* === Calendar Adjustments === */

/* Force the calendar table back into a solid, connected spreadsheet grid layout */
table.calendar {
  width: auto !important;
  max-width: 320px; 
  border-collapse: collapse; /* FIX: Removes the gaps and smashes all cells tightly together */
  margin-bottom: 15px;
}

/* Target the month and year text row inside your calendar grid to make it bold and readable */
table.calendar tr:first-child td,
table.calendar caption,
table.calendar td[colspan="7"] {
  font-size: 18px !important;    /* Boosts the font size to make it prominent */
  font-weight: bold !important;  /* Enforces a crisp, clear bold look */
  text-align: center;
  padding: 8px 0;
  color: #111111;
}

/* Day title characters header row (S M T W T F S) */
table.calendar th {
  font-size: 13px;
  font-weight: 700;
  color: #555;
  padding: 4px;
  text-align: center;
  border: 1px solid #000000; /* Reapplies your original classic outline if desired */
}

/* Target individual day cells inside rows to restore standard connection borders */
tr td.calendar {
  width: 36px !important;
  height: 30px !important;
  text-align: center;
  vertical-align: middle;
  border: 1px solid #000000; /* FIX: Forces uniform, connected 1px grid lines with NO outer space */
  font-size: 13px;
  padding: 0 !important;
}

/* Keep number text click anchors perfectly proportioned within the merged grid lines */
tr td.calendar a {
  color: #1f2937;
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
  line-height: 30px;
}

/* Maintain a clean interactive highlight background on cursor hover pass */
tr td.calendar:hover {
  background-color: #f0fdf4 !important;
}

/* === Player Table Adjustments === */

table.playerTable {
  width: 100%;
  max-width: 760px;
  border-collapse: separate;
  border-spacing: 4px;
}

/* Tighten the cell spacing inside your 5-column grid layout */
table.playerTable td.daycell {
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 0 !important;
}

/* Tighten padding properties and force labels to stay on one single line */
.special_field_link label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;               /* Reduced vertical padding from 6px to 3px */
  font-size: 13px;  
  font-weight: normal !important;
  color: #333;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  white-space: nowrap;            /* FIX: Prevents multi-word names from wrapping onto new rows */
  overflow: hidden;               /* Ensures long names cut clean without breaking the grid */
  text-overflow: ellipsis;        /* Appends '...' gracefully if a name exceeds cell width bounds */
}

.special_field_link input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #2d7a47;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;                 /* FIX: Stops checkboxes from squishing on tight layouts */
}


/* === Form & Action Buttons === */

/* Ensure the layout row balances perfectly horizontally */
.action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 15px 0;
}

/* Base style for all text input and submit fields to keep heights identical */
input[type="text"]#game_search,
.btn-primary,
.btn-suggestions,
.btn-sort {
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
  
  /* FIX: Remove strict height and replace with padding + line-height */
  height: auto;
  line-height: 1.4;
  padding-top: 7px;
  padding-bottom: 7px;
}


/* Search input field text block */
input[type="text"]#game_search {
  width: 250px;
  padding: 6px 10px;
  border: 1px solid #767676;
  border-radius: 2px;
}

/* Classic crisp look for your primary Submit button */
.btn-primary {
  background-color: #f0f0f0;
  color: #000000;
  border: 1px solid #767676;
  padding: 0 16px;
  border-radius: 2px;
  font-weight: normal;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #e5e5e5;
  border-color: #000000;
}

/* Target your prominent Get Game Suggestions button with your Kuner Green */
.btn-suggestions {
  background-color: #2d7a47; /* Your app's green accent */
  color: #ffffff;
  border: 1px solid #235f37;
  padding: 0 20px;
  font-weight: bold;
  border-radius: 3px;
  cursor: pointer;
  display: inline-block;
  margin-top: 5px;
}

.btn-suggestions:hover {
  background-color: #235f37;
}

/* Clean, crisp baseline for the sorting button at the bottom */
.btn-sort {
  background-color: #ffffff;
  color: #333333;
  border: 1px solid #767676;
  padding: 0 12px;
  border-radius: 2px;
  cursor: pointer;
  margin-top: 15px;
  display: block;
}

.btn-sort:hover {
  background-color: #f5f5f5;
}

/* === Mobile Responsive Design (For Phone Screens) === */
@media screen and (max-width: 600px) {
  /* 1. Unpack the rigid desktop containers */
  .dashboard-container,
  .suggestion-box {
    margin: 10px !important;
    padding: 12px !important;
    max-width: 100% !important;
  }

  /* 2. Break down the 3-button horizontal row into an easy-to-tap vertical stack */
  .action-row {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px;
  }

  input[type="text"]#game_search,
  .btn-primary,
  .btn-suggestions {
    width: 100% !important;
    max-width: 100% !important;
    height: 40px !important; /* Slightly larger buttons make them much easier to tap with thumbs */
  }

  /* 3. Transform the Suggestion Grids into clear, stacked rows */
  .suggestion-box div[style*="display: grid"] {
    display: block !important; /* Deactivates the narrow desktop column columns */
  }

  /* Hide the static table header row completely on mobile screens */
  .suggestion-box div[style*="font-weight: bold; border-bottom"] {
    display: none !important;
  }

  /* 4. Style each game entry as a standalone visual card */
  .suggestion-box div[style*="border-bottom: 1px solid"] {
    display: inline-block;
    width: 100%;
    padding: 8px 4px !important;
    white-space: normal !important; /* Allows long game titles to wrap naturally instead of breaking */
    border-bottom: 1px solid #e5e7eb !important;
  }

  /* Force the individual cell elements to align neatly on their own lines */
  .suggestion-box div[style*="font-weight: bold;"] {
    font-size: 16px !important; /* Makes the primary game name stand out clearly */
    color: #111;
    display: block !important;
    border-bottom: none !important;
  }

  /* Add quick labels before the metadata values so they make sense without headers */
  .suggestion-box div[style*="color: #555;"]::before { content: "Players: "; font-weight: 600; color: #777; }
  .suggestion-box div[style*="color: #555;"] { display: block !important; border-bottom: none !important; color: #333 !important; font-size: 13px; }

  .suggestion-box div[style*="Never played"]::before { content: "History: "; font-weight: 600; color: #777; }
  .suggestion-box div[style*="Never played"],
  .suggestion-box div:not([style*="bold"]):not([style*="#555"]) { 
    display: block !important; 
    border-bottom: none !important; 
    font-size: 13px;
  }
}

/* === Authentication Page Layout Adjustments === */

/* Center container card on the login, register, and add player screens */
.login-container {
  max-width: 400px;
  margin: 50px auto;
  background: #ffffff;
  padding: 24px;
  border: 1px solid #e1e4e6;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.login-container h2 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 20px;
  color: #111111;
  border-bottom: 2px solid #2d7a47; /* Adds the Kuner Green accent line under form titles */
  padding-bottom: 8px;
}

/* Structural stacking for login and registration text fields */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555555;
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s ease-in-out;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus {
  border-color: #2d7a47;
  box-shadow: 0 0 0 3px rgba(45, 122, 71, 0.15);
}

/* Form action elements positioning block */
.login-container form button[type="submit"],
.login-container form input[type="submit"] {
  height: 36px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: bold;
}

/* Clear, crisp alert flags for server side confirmation statuses */
.error-msg {
  background-color: #fdf2f2;
  color: #9b1c1c;
  border: 1px solid #f8b4b4;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 16px;
}

.success-msg {
  background-color: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* Clean text link styling to balance form baselines */
.login-container a {
  color: #2d7a47;
  text-decoration: none;
  font-weight: 500;
}

.login-container a:hover {
  text-decoration: underline;
  color: #235f37;
}
/* Unplayed Shelf Vault Stylesheet Extensions */
.unplayed-header-badge {
  background: #2d7a47;
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  font-family: monospace;
}

.unplayed-subtitle {
  font-size: 13px;
  color: #555555;
  margin-top: -5px;
  margin-bottom: 20px;
}

.unplayed-grid-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
}

.unplayed-card-column {
  flex: 1 1 280px;
  background: #ffffff;
  border: 1px solid #e1e4e6;
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  box-sizing: border-box;
}

.unplayed-scroll-box {
  max-height: 350px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 12px;
  padding-right: 5px;
}

.unplayed-item-row {
  padding: 6px;
  border-bottom: 1px solid #eeeeee;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.unplayed-item-name {
  color: #111111;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.unplayed-item-count {
  color: #777777;
}

.unplayed-empty-text {
  color: #777777;
  font-style: italic;
  padding: 10px 0;
}

/* === Verification Status Box Additions === */
.status-box {
  background: #f9fafb;
  border-left: 4px solid #cccccc; /* Default pending state color */
  padding: 12px 15px;
  margin-bottom: 15px;
  border-radius: 0 4px 4px 0;
  height: auto !important;        /* FIX: Overrides the strict 36px element height cutoff */
}

/* Success status modifier */
.status-box.verified {
  border-left-color: #2d7a47;     /* Green accent border anchor */
  background: #f0fdf4;
}

/* Ensure the status banner text letters never clip at the baseline */
.status-text {
  margin: 0 0 10px 0;
  line-height: 1.5 !important;    /* FIX: Provides full breathing room for letter descenders */
  font-size: 14px;
  height: auto !important;        /* FIX: Prevents font squishing */
}

/* Clean spacing fallback for the success paragraph block */
.status-box.verified .status-text {
  margin-bottom: 0;               /* Tightens padding when form is gone */
}

/* The slider track background (Default: Left / Red / Decline) */
.toggle-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #dc2626; /* Matches your original decline red */
  transition: 0.3s;
  border-radius: 26px;
}

/* The white sliding dot inside */
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

/* Track color changes to green when input is checked (Right / Verified) */
input:checked + .toggle-slider {
  background-color: #2d7a47; /* Matches your original verify green */
}

/* Animates the dot over to the right when checked */
input:checked + .toggle-slider:before {
  transform: translateX(24px);
}
