﻿/* ====================================
   1. LAYOUT & STRUCTURE (MOBILE-FIRST)
   ==================================== */

.gear-picker-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1rem 2rem;
  display: grid;
  grid-template-columns: 1fr; /* start as single column */
  gap: 1.5rem;
}
/* --- FIX: Universal Dark Background --- */
.dashboard-page,
.gear-picker-page {
  background: var(--bg, #0f1f3a) !important;
}
/* Center form & results when stacked */
.gear-form-card,
.gear-results-section {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  justify-self: center; /* center inside grid column */
}

.gear-picker-page h1 {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-heading, #fff);
  margin-bottom: 0.25rem;
}

.picker-intro {
  font-size: 0.95rem;
  color: var(--text-muted, #9ca3af);
  max-width: 720px;
  margin-bottom: 0.75rem;
}

/* --- DESKTOP: switch to sidebar only when we have results --- */
@media (min-width: 1024px) {
  /* Default desktop: still single centered column */
  .gear-picker-page {
    grid-template-columns: 1fr;
  }

  .gear-picker-page h1 {
    font-size: 2.5rem;
  }

  /* When results exist, use sidebar layout */
  .gear-picker-page.has-results {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    column-gap: 2rem;
    align-items: flex-start;
  }

  .gear-picker-page.has-results .gear-form-card,
  .gear-picker-page.has-results .gear-results-section {
    max-width: none;
    margin: 0;
    justify-self: stretch;
  }

  /* Stack selects vertically in sidebar */
  .gear-picker-page.has-results .gear-form-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------
   1b. Banner at top (matches home)
   ------------------------------------ */

.report-banner {
  display: block;
  text-align: center;
  padding: 0.5rem 0.75rem;
  background: #047857; /* emerald-700 */
  color: #f9fafb;
  font: 600 13px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-decoration: none;
}

.report-banner:hover {
  background: #065f46; /* emerald-800 */
  color: #ffffff;
}

/* ====================================
   2. FORM STYLES
   ==================================== */

.gear-form-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 0.75rem;
  padding: 1.25rem 1.25rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* Field grid */
.gear-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .gear-form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gear-form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--text-heading, #fff);
}

/* Selects */
.gear-form-field select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  background-color: var(--bg-select, #063c30);
  border: 1px solid var(--emerald-500, #10b981);
  color: var(--text-white, #fff);
  appearance: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gear-form-field option {
  background-color: var(--bg-dark, #0f172a) !important;
  color: #fff !important;
}

.gear-form-field select:focus {
  border-color: var(--emerald-400, #34d399);
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

/* Buttons */
.gear-form-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-main,
.btn-ghost {
  width: 100%;
  padding: 0.75rem 1.5rem;
}

@media (min-width: 480px) {
  .gear-form-actions {
    flex-direction: row;
  }

  .btn-main,
  .btn-ghost {
    width: auto;
  }
}

.btn-main {
  background-color: var(--emerald-500, #10b981);
  color: var(--bg-dark, #0f172a);
  font-weight: 700;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-main:hover {
  background-color: var(--emerald-400, #34d399);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted, #9ca3af);
  border: 1px solid var(--text-muted, #9ca3af);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  color: var(--text, #f3f4f6);
  border-color: var(--text, #f3f4f6);
}

/* ====================================
   3. RESULTS SECTION
   ==================================== */

.gear-results-section {
  background: rgba(15, 23, 42, 0.85);
  border-radius: 0.75rem;
  padding: 1.25rem 1.25rem 1.5rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.gear-results-header h2 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
  color: var(--text-heading, #fff);
}

#results-subtitle {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted, #9ca3af);
}

#gear-empty-state {
  font-size: 0.9rem;
  color: var(--text-muted, #9ca3af);
  margin-top: 0.25rem;
}

/* Groupings by type (Rod, Reel, etc.) */
.gear-group {
  margin-bottom: 1.25rem;
}

.gear-group-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.gear-group-note {
  font-size: 0.85rem;
  color: var(--text-muted, #9ca3af);
  margin-bottom: 0.5rem;
}

/* Grid of cards inside each group */
.gear-group-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

@media (min-width: 768px) {
  .gear-group-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

/* ====================================
   4. CARD STYLES
   ==================================== */

.gear-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 0.75rem 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.6rem;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.gear-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.3),
    0 0 10px rgba(16, 185, 129, 0.12);
}

/* Layout inside card */
.gear-card-main {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.gear-card-thumb {
  flex: 0 0 auto;
}

.gear-card-thumb img {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  object-fit: contain;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.4);
  opacity: 0.95;
}

.gear-card-text {
  flex: 1 1 auto;
}

/* Text */
.gear-card-title {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.gear-card-brand {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.78rem;
  color: var(--emerald-300, #6ee7b7);
}

.gear-card-spec,
.gear-card-notes {
  font-size: 0.9rem;
  line-height: 1.35;
  margin-bottom: 0.25rem;
  color: var(--text-muted, #9ca3af);
}

/* Tags & button */
.gear-card-tags {
  margin-top: 0.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: rgba(229, 231, 235, 0.9);
}

.tag-budget {
  border-color: #22c55e;
  color: #bbf7d0;
}

.tag-mid {
  border-color: #38bdf8;
  color: #e0f2fe;
}

.tag-premium {
  border-color: #eab308;
  color: #fef9c3;
}

.tag-skill {
  border-color: #a855f7;
  color: #f5e1ff;
}

.gear-card-actions {
  margin-top: 0.6rem;
}

.gear-card-actions .btn.tiny {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

/* On wider screens, put button on the right side */
@media (min-width: 900px) {
  .gear-card {
    flex-direction: row;
    align-items: flex-start;
  }

  .gear-card-main {
    flex: 1 1 auto;
  }

  .gear-card-actions {
    margin-top: 0;
    margin-left: 1rem;
    align-self: center;
  }
}


/* ====================================
   MAGIC: BUILDING STATE SHIMMER
   ==================================== */

.gear-picker-page.is-building .gear-results-section {
  position: relative;
  overflow: hidden;
}

/* Faint gradient bar that sweeps across the top while building */
.gear-picker-page.is-building .gear-results-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(45, 212, 191, 0) 0%,
    rgba(45, 212, 191, 0.8) 50%,
    rgba(45, 212, 191, 0) 100%
  );
  animation: rffBuildingBar 1.1s linear infinite;
}

@keyframes rffBuildingBar {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(260%);
  }
}



/* ====================================
   5. ANIMATED REVEAL FOR RESULT CARDS
   ==================================== */

/* Base state: cards are hidden and slightly dropped */
/* ====================================
   5. ANIMATED REVEAL FOR RESULT CARDS
   ==================================== */

/* Base state: hidden & slightly dropped */
.gear-card {
  opacity: 0;
  transform: translateY(16px) scale(0.97);
}

/* When results appear, animate them in with a soft lift & glow */
.gear-picker-page.has-results .gear-card {
  animation: rffCardReveal 0.75s ease-out forwards;
}

/* Slight "lift and settle" plus a gentle glow */
@keyframes rffCardReveal {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    box-shadow: none;
  }
  60% {
    opacity: 1;
    transform: translateY(0) scale(1.01);
    box-shadow:
      0 10px 30px rgba(0, 0, 0, 0.45),
      0 0 12px rgba(16, 185, 129, 0.25);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow:
      0 6px 18px rgba(0, 0, 0, 0.35),
      0 0 6px rgba(16, 185, 129, 0.15);
  }
}

/* Staggered reveal per group (one after another) */
.gear-picker-page.has-results .gear-group-grid .gear-card:nth-child(1) {
  animation-delay: 0.20s;
}
.gear-picker-page.has-results .gear-group-grid .gear-card:nth-child(2) {
  animation-delay: 0.45s;
}
.gear-picker-page.has-results .gear-group-grid .gear-card:nth-child(3) {
  animation-delay: 0.70s;
}
.gear-picker-page.has-results .gear-group-grid .gear-card:nth-child(4) {
  animation-delay: 0.95s;
}
.gear-picker-page.has-results .gear-group-grid .gear-card:nth-child(5) {
  animation-delay: 1.20s;
}
.gear-picker-page.has-results .gear-group-grid .gear-card:nth-child(6) {
  animation-delay: 1.45s;
}
/* Add more nth-child rules if you want longer sequences */
/* add more nth-child rules if you want longer sequences */


.gear-picker-faq {
  max-width: 900px;
  margin: 2.5rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.95rem;
  color: var(--text-muted, #9ca3af);
}

.gear-picker-faq h2 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--text-heading, #fff);
}

.gear-picker-faq h3 {
  font-size: 1.05rem;
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
  color: var(--text-heading, #e5e7eb);
}

.gear-picker-faq p {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}
/* ======================================================
   FIX RESULTS TEXT COLOR — MAKE EVERYTHING READABLE
   ====================================================== */

.gear-results-section,
.gear-results-section * {
  color: var(--ink) !important;   /* site-wide text color */
}

#gear-rig-result,
#gear-rig-result *,
#gear-results,
#gear-results *,
#results-subtitle {
  color: var(--ink) !important;
}

#gear-empty-state {
  color: var(--muted) !important; /* softer but still readable */
}
/* ======================================================
   FIX: Make Gear Picker Results Text Bright White
   ====================================================== */

.gear-results-section,
.gear-results-section h1,
.gear-results-section h2,
.gear-results-section h3,
.gear-results-section p,
.gear-results-section li,
.gear-results-section div,
#gear-rig-result,
#gear-rig-result * {
  color: #f2f7ff !important;   /* clean, readable white-blue */
}

/* Optional: soften subtitles slightly */
#results-subtitle {
  color: #c9d5e8 !important;
}

/* Optional: empty state */
#gear-empty-state {
  color: #c9d5e8 !important;
}