/* guides.css */

/* ==========================================================================
   Guides & Knowledge Center Styles
   ========================================================================== */

/* State Compliance Form */
.state-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-block: 2rem;
  justify-content: center;
}

.state-form select {
  flex: 1 1 15rem;
  padding: 0.75rem;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  background-color: var(--clr-bg);
  color: var(--clr-text);
  transition: border 0.2s ease;
}

.state-form select:focus {
  border-color: var(--clr-primary);
  outline: none;
}

/* Tabs Navigation */
.tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2.5rem auto 1rem;
  border-radius: var(--radius-lg);
  background: #f1f5f9;
  max-width: 40rem;
  overflow: hidden;
}

.tabs button {
  flex: 1;
  padding: 0.8rem 1rem;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  background: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.tabs button[aria-selected="true"] {
  background: var(--clr-primary);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.tabs button:not([aria-selected="true"]):hover,
.tabs button:not([aria-selected="true"]):focus {
  background: #e2e8f0;
  outline: none;
}

/* Tab Panels */
.tab-panels {
  margin-top: 1rem;
}

.tab-panel[hidden] {
  display: none !important;
}

/* Guide Layout: Sidebar + Detail */
.guide-layout {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Guide List (Sidebar) */
.guide-list {
  list-style: none;
  padding: 0;
  flex: 1 1 280px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.guide-list::-webkit-scrollbar {
  width: 6px;
}
.guide-list::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}
.guide-list::-webkit-scrollbar-track {
  background: transparent;
}

/* Guide List Item */
.guide-list-item .guide-btn {
  text-align: left;
  padding: 1rem 1.25rem;
  background: var(--clr-bg);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.guide-list-item .guide-btn:hover,
.guide-list-item .guide-btn:focus {
  background: #f9fafb;
  transform: translateY(-1px);
  outline: none;
}

.guide-list-item .guide-btn.active {
  border-color: var(--clr-primary);
  background: #eef2ff;
}

.guide-list-item .guide-btn h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--clr-primary);
}

.guide-list-item .guide-btn p {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--clr-text);
  line-height: 1.4;
}

/* Guide Details Panel */
.guide-detail {
  flex: 1 1 500px;
  min-width: 300px;
  background: var(--clr-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 0.75rem;
}

.guide-detail::-webkit-scrollbar {
  width: 6px;
}
.guide-detail::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}
.guide-detail::-webkit-scrollbar-track {
  background: transparent;
}

.guide-detail-card h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--clr-secondary);
}

.guide-detail-card p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: var(--clr-text);
}

/* Detail Navigation Buttons */
.detail-nav {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.detail-nav button {
  background: var(--clr-primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.detail-nav button:disabled {
  background: var(--clr-border);
  cursor: not-allowed;
  color: #9ca3af;
}

.detail-nav button:hover:not(:disabled),
.detail-nav button:focus:not(:disabled) {
  background: #4338ca;
  outline: none;
}

/* State Compliance Card */
.state-guide-card {
  background: var(--clr-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  margin-top: 2rem;
  animation: fadeIn 0.3s ease;
}

.state-guide-card h3 {
  font-size: 1.5rem;
  color: var(--clr-primary);
  margin-bottom: 1rem;
}

.state-guide-card section + section {
  margin-top: 1.75rem;
}

.state-guide-card h4 {
  font-size: 1.15rem;
  color: var(--clr-secondary);
  margin-bottom: 0.5rem;
}

.state-guide-card ul {
  margin-left: 1.25rem;
  list-style: disc;
  line-height: 1.6;
  color: var(--clr-text);
}

.state-guide-card small {
  display: block;
  margin-top: 1.5rem;
  color: #6b7280;
  font-size: 0.875rem;
}

/* Responsive Behavior */
@media (max-width: 768px) {
  .guide-layout {
    flex-direction: column;
  }
  .guide-detail {
    height: 80vh;
    max-height: 85vh;
  }
  .guide-list {
    max-height: 40vh;
  }
}



/* ─────────────────────────────────────────────────────────────────────────
   Knowledge Center Icon Dark-Mode Background
   ───────────────────────────────────────────────────────────────────────── */

   :root[data-theme="dark"] .knowledge-banner__icon {
    /* make the transparent PNG sit on your dark “surface” color */
    background-color: var(--clr-surface);
    /* optional: give it a little breathing room & rounded corners */
    padding: 0.5rem;
    border-radius: var(--radius-md);
    /* ensure it doesn’t stretch the layout */
    display: inline-block;
  }
  

  /* guides.css */

/* …existing .state-form rules… */

.state-form select {
  flex: 1 1 15rem;        /* equal width for each dropdown */
  min-width: 12rem;       /* ensure legibility */
}

/* Space between the two selects on narrower screens */
.state-form select + select {
  margin-left: 1rem;
}

/* Ensure Show Info button lines up */
.state-form button {
  flex: 0 0 auto;
  margin-left: 1rem;
}


/* ─────────────────────────────────────────────────────────────────────────
   DARK MODE: Knowledge Center Guide List
   ───────────────────────────────────────────────────────────────────────── */
   :root[data-theme="dark"] .guide-list-item .guide-btn {
    background: var(--clr-surface);
    border-color: var(--clr-border);
    color: var(--clr-text-primary);
    box-shadow: var(--clr-shadow-sm);
  }
  
  :root[data-theme="dark"] .guide-list-item .guide-btn:hover,
  :root[data-theme="dark"] .guide-list-item .guide-btn:focus {
    background: rgba(255, 255, 255, 0.05); /* subtle hover */
    transform: translateY(-1px);
    outline: none;
  }
  
  :root[data-theme="dark"] .guide-list-item .guide-btn.active {
    background: rgba(52, 211, 153, 0.1); /* light green tint */
    border-color: var(--clr-primary);
  }
  
  :root[data-theme="dark"] .guide-list-item .guide-btn h3 {
    color: var(--clr-primary);
  }
  
  :root[data-theme="dark"] .guide-list-item .guide-btn p {
    color: var(--clr-text-secondary);
  }
  
  :root[data-theme="dark"] .guide-detail {
    background: var(--clr-surface);
    color: var(--clr-text-primary);
  }
  
  :root[data-theme="dark"] .guide-detail-card h2 {
    color: var(--clr-primary);
  }
  
  :root[data-theme="dark"] .guide-detail-card p {
    color: var(--clr-text-secondary);
  }
  

  /* ─────────────────────────────────────────────────────────────────────────
   DARK MODE: Guide Tabs Styling
   ───────────────────────────────────────────────────────────────────────── */
:root[data-theme="dark"] .tabs {
  background: var(--clr-surface);
  box-shadow: var(--clr-shadow-sm);
}

:root[data-theme="dark"] .tabs button {
  background: transparent;
  color: var(--clr-text-secondary);
}

:root[data-theme="dark"] .tabs button[aria-selected="true"] {
  background: var(--clr-primary);
  color: #000; /* optional: or #111 or #1e1e1e depending on desired contrast */
  box-shadow: var(--clr-shadow-md);
}

:root[data-theme="dark"] .tabs button:not([aria-selected="true"]):hover,
:root[data-theme="dark"] .tabs button:not([aria-selected="true"]):focus {
  background: rgba(255, 255, 255, 0.05);
  color: var(--clr-text-primary);
}


/* ==========================================================================
   Guides / Knowledge Center: Highlight the container bounds
   ========================================================================== */
   #guideHub {
    border: 2px dashed var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    background-color: var(--clr-bg);
    margin-bottom: 3rem;
  }
  
  /* Tweak inner spacing so banner and tabs don’t butt right up against the border */
  #guideHub .knowledge-banner,
  #guideHub .section__subtitle,
  #guideHub .tabs {
    margin-bottom: 1.5rem;
  }
  
