/* ===== Fortnite Save the World Planner theme ===== */

/* Fonts */
@font-face {
  font-family: 'BurbankBig';
  src: url('assets/Burbank Big Condensed Black.otf') format('opentype');
}
@font-face {
  font-family: 'KaTeX';
  src: url('assets/KaTeX_SansSerif-Regular.ttf') format('truetype');
}

/* Background with ghost VBucks (image on top of gradient) */
body {
  margin: 0;
  font-family: 'KaTeX', Arial, sans-serif;
  color: #fff;
  min-height: 100vh;

  /* image layer first (on top), gradient behind */
  background-image: url('assets/fadedvbuck.png'), linear-gradient(180deg, #3a3a3a 0%, #1f1f1f 100%);
  background-repeat: repeat, no-repeat;
  background-position: center top, center center;
  background-size: 200px, cover;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

/* Site-wide Banner */
.site-banner {
  background: #4d2828; /* Dark red, warning-like */
  border-bottom: 2px solid #ff5050;
  padding: 12px 20px;
  margin: 0 auto 20px auto;
  max-width: 960px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  color: #f0f0f0;
  font-size: 14px;
  line-height: 1.5;
}
.site-banner p {
  margin: 0 0 10px 0;
}
.site-banner a {
  color: #89c4ff;
  text-decoration: underline;
}
.site-banner a:hover {
  color: #aed6f8;
}
.site-banner-actions {
  text-align: right;
}
.banner-action-btn {
  background: #3d1f1f; /* Darker red background */
  border: 1px solid #6e3a3a;
  border-radius: 6px;
  color: #e0e0e0; /* Lighter text */
  cursor: pointer;
  font-family: 'KaTeX', Arial, sans-serif; /* Use the main body font */
  text-transform: none; /* Override the default button uppercase */
  font-size: 13px; /* Slightly larger text */
  text-decoration: none; /* Removed underline for a cleaner button look */
  padding: 5px 10px; /* Increased padding to make button bigger */
  margin-left: 10px;
  transition: background-color 0.2s, color 0.2s;
}
.banner-action-btn:hover {
  background-color: #5a2e2e; /* Lighter red on hover */
  color: #fff;
}

/* Reset Info + Countdown */
.reset-info {
  margin: 20px 0;
  padding: 10px;
  border-radius: 8px;
  background: #1a2336;
  border: 1px solid #2d3f66;
  color: #fff;
  font-size: 14px;
  line-height: 1;
}
.reset-info strong {
  color: #ffe866;
}
.reset-timer {
  margin-top: 0px;
  padding: 0px;
  background: #111a2c;
  border: 1px solid #334466;
  border-radius: 6px;
  text-align: center;
  font-family: 'BurbankBig', sans-serif;
  font-size: 20px;
  color: #ffe866;
  text-shadow: 1px 1px 4px #000;
}
.reset-info .missions-btn {
  margin-top: 10px;
  margin-bottom: 0px;
}

/* Card / Holder */
.card {
  background: linear-gradient(180deg, #2f3139 0%, #1c1e24 100%);
  border-radius: 12px;
  padding: 24px;            /* spacing inside holder so nothing clips */
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
  max-width: 960px;
  margin: 20px auto;
  overflow: visible;
}
.card-header {
  background: url('assets/banner.png') center/cover no-repeat;
  height: 160px;
}
.card-body {
  padding: 22px;
}

/* Headings with glow */
h1, h2, h3 {
  font-family: 'BurbankBig', sans-serif;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 2px 2px 6px #000;
  text-align: center;
}
h1 {
  text-transform: uppercase;
  font-size: 42px;
}
p.lead {
  font-size: 16px;
  color: #cfd6e6;
  margin-bottom: 18px;
  text-align: center;
}

/* Section Title Bar (e.g., for "Calculator") */
.section-header {
  margin-top: 30px;
  margin-bottom: 20px;
}
.section-title {
  text-transform: uppercase;
  font-size: 28px;
  margin-bottom: 10px;
}
.section-divider {
  border: 0;
  height: 1px;
  background: #2d3f66;
}

/* Footer links */
footer a {
  color: #fff69d;               /* OG Fortnite yellow */
  text-decoration: none;        /* remove underline */
  text-shadow: 1px 1px 4px #000;
}
footer a:hover {
  color: #ffe866;
}
footer a:visited {
  color: #fff69d;               /* same as normal so it never looks "visited" */
}

/* Smaller + italic for last line */
footer .small-note {
  font-size: 11px;
  font-style: italic;
  color: #bfc6d6;
}

/* Grid + form layout */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px; /* breathing room */
}
@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; }
}

/* Ensure .row is a horizontal flex container (used in Daily Quests) */
.row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Default labels for stacked form controls */
label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #d9e3f7;
}

/* Labels inside .row should be inline-flex to align small controls nicely */
.row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0; /* let inline style override if needed */
}

/* Form control styling - target common text-like inputs, selects, textarea */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: none;
  background: #0f1a30;
  color: #fff;
  font-family: 'KaTeX', sans-serif;
  box-sizing: border-box;
}

/* Make 'small' inputs explicit (todayRead, pending count, etc) */
.small-input {
  width: auto;
  min-width: 64px;
  max-width: 180px;
  padding: 6px;
}

/* IMPORTANT: override for checkboxes/radios so they are not stretched */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  height: auto;
  display: inline-block;
  margin: 0;
  vertical-align: middle;
  box-sizing: content-box;
  accent-color: #ffe866; /* yellow accent (Firefox & modern browsers) */
}

/* Improve number input spinner sizing inside compact labels */
input[type="number"] {
  -moz-appearance: textfield; /* hide native firefox number arrows unless you want them */
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Focus */
input:focus, select:focus, textarea:focus {
  outline: 2px solid #2ea3ff;
  outline-offset: 0;
}

/* Optional checkbox-label helper (if you prefer explicit class on label) */
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

/* Buttons - faint yellow gradient */
button {
  background: linear-gradient(180deg, #fff69d 0%, #ffe866 100%);
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: 'BurbankBig', sans-serif;
  font-size: 16px;
  color: #000;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.4);
  transition: transform 0.15s;
}
button:hover { transform: scale(1.05); }
button.secondary {
  background: linear-gradient(180deg, #f4f4f4 0%, #ddd 100%);
  color: #000;
}

/* Result / breakdown box (text forced bright white for readability) */
.result {
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  background: #111a2c;
  border: 1px solid #2d3f66;
  color: #ffffff !important;
  font-size: 15px;
  line-height: 1.6;
}
.result p, .result span, .result li, .result div {
  color: #ffffff !important;
}
.result h3, .result h4, .result h2 {
  font-family: 'BurbankBig', sans-serif;
  color: #ffe866 !important;
  text-shadow: 1px 1px 4px #000;
  margin-top: 12px;
  margin-bottom: 8px;
}

/* ok/bad badges */
.ok { color: #38e066 !important; font-weight: bold; }
.bad { color: #ff5050 !important; font-weight: bold; }

/* Flex utilities */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Missions label */
.missions-btn {
  display: block;
  width: fit-content;
  margin: 20px auto; /* Centered for standalone use */
  font-family: 'BurbankBig', sans-serif;
  font-size: 25px;
  text-transform: uppercase;
  text-decoration: none;
  color: #e4e4e4;
  text-shadow: 1px 1px 4px #000;
}
.missions-btn:hover { color: #e4e4e4; }
.missions-btn:visited { color: #e4e4e4; }

/* Override for when .missions-btn is used as a title inside the reset-info box */
.reset-info .missions-btn {
  margin: 10px auto 5px auto; /* Reduced bottom margin for tighter spacing */
  text-align: center; /* Ensure text is centered within its own width */
  width: fit-content; /* Allow margin auto to work for centering */
}

/* Live V-Buck Missions List */
.vbuck-missions-container {
  /* The border-top is no longer needed as it's inside the main reset-info box */
  margin-bottom: 15px; /* Space after the divider */
  padding-bottom: 15px; /* Space before the divider */
  border-bottom: 1px solid #2d3f66; /* The divider line */
}

/* When there are no missions, collapse the container's spacing and hide the divider */
.vbuck-missions-container.is-empty {
  padding-bottom: 0;
  margin-bottom: 5px; /* Keep a small gap */
  border-bottom: none;
}

#vbuck-missions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mission-loading {
  text-align: center;
  font-size: 13px;
  color: #bfc6d6;
  padding: 10px 0;
}

/* Message for when no V-Buck missions are available */
.no-missions-message {
  font-family: 'BurbankBig', sans-serif;
  font-size: 22px;
  color: #fff;
  text-align: center;
  padding: 4px 0; /* Reduced vertical padding */
  text-transform: uppercase;
  margin: 0; /* Remove default paragraph margin */
}

.vbuck-mission-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #111a2c;
  border: 1px solid #334466;
  border-radius: 6px;
  padding: 8px 12px;
}

.mission-type-icon {
  width: 16px;
  height: 16px;
}

.mission-details {
  display: flex;
  flex-direction: column;
  gap: 2px; /* Small gap between name and zone */
}

.mission-name-container {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mission-name { font-weight: bold; font-size: 14px; color: #fff; }
.mission-zone { font-size: 12px; color: #a9b8d8; }

.mission-reward {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'BurbankBig', sans-serif;
  font-size: 18px;
  color: #fff;
}

/*
  The Burbank font has an unusual baseline that makes it appear too low when
  centered with flexbox. We'll use a relative position to manually nudge it
  for a perfect visual alignment with the icon.
*/
.mission-reward span { position: relative; top: 1px; }

.vbuck-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle; /* Better alignment with text */
}
#vbuck-missions-total {
  font-family: 'BurbankBig', sans-serif;
  text-align: right;
  font-size: 16px;
  color: #ffe866;
  margin-top: 8px;
  padding-right: 5px;
  text-shadow: 1px 1px 4px #000;
}

/* Footer */
footer {
  text-align: center;
  font-size: 13px;
  color: #cdd4e6;
  margin: 40px 0 20px;
}
footer p { margin: 4px 0; }