/* Custom styles for the laptop study guide (light Modern Tech Clean theme) */

/* Hide scrollbars on horizontal chip rails */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Radar chart sizing */
.chart-container { position: relative; width: 100%; height: 320px; }
@media (min-width: 768px) { .chart-container { height: 350px; } }

/* Desktop tab pills */
.tab-btn { color: #475569; }
.tab-btn:hover { color: #0f172a; }
.tab-btn.active { background-color: #4f46e5; color: #ffffff; box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35); }
.tab-parent.active { background-color: #eef2ff; color: #4338ca; }

/* Header dropdown menus are controlled by JS for reliable touch and keyboard use. */
.nav-drop .drop-panel { display: none; }
.nav-drop.is-open .drop-panel { display: block; }
.nav-drop.is-open .tab-parent { background-color: #eef2ff; color: #4338ca; }

/* Mobile bottom tabs (44px touch targets) */
.mobile-tab-btn { color: #64748b; min-width: 44px; min-height: 44px; }
.mobile-tab-btn.active { color: #4f46e5; }
.mobile-tab-btn.active svg { transform: scale(1.1); }

/* Light glass header */
.glass-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Range sliders */
input[type="range"] { accent-color: #4f46e5; }

.catalog-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}
.catalog-tag-teal { color: #0f766e; background: #ccfbf1; border: 1px solid #99f6e4; }
.catalog-tag-sky { color: #0369a1; background: #e0f2fe; border: 1px solid #bae6fd; }
.catalog-tag-violet { color: #6d28d9; background: #ede9fe; border: 1px solid #ddd6fe; }

body { padding-bottom: 3rem; }

.recommendation-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.recommendation-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(7.5rem, auto);
  align-items: start;
  gap: 0.75rem;
}

.recommendation-card-title {
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.recommendation-card-price {
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.spec-item {
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
  color: #334155;
  font-size: 0.75rem;
  line-height: 1.45;
}

.spec-item strong {
  display: block;
  color: #64748b;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.spec-item span {
  display: block;
  overflow-wrap: anywhere;
}

.spec-item-highlight {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.retailer-details summary {
  list-style: none;
  border: 1px solid #e0e7ff;
  border-radius: 0.75rem;
  background: #f8faff;
}

.retailer-details summary::-webkit-details-marker { display: none; }
.retailer-details[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

.action-card.is-selected {
  border: 2px solid #4f46e5;
  background: rgba(238, 242, 255, 0.7);
  box-shadow: 0 8px 24px -12px rgba(79, 70, 229, 0.45);
  outline: 2px solid rgba(99, 102, 241, 0.2);
}

.app-toast {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 5.5rem;
  z-index: 70;
  max-width: 32rem;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  border: 1px solid #a7f3d0;
  border-radius: 1rem;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 16px 32px -16px rgba(15, 23, 42, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(1rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 1024px) {
  .app-toast { bottom: 1rem; }
}

.comparison-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.comparison-grid { min-width: 42rem; }
.comparison-grid > :nth-child(3n + 1) {
  position: sticky;
  left: 0;
  z-index: 10;
  background: #ffffff;
}

@media (max-width: 767px) {
  body { padding-bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); }
  .glass-header .brand-name { font-size: 0.95rem; }
  .glass-header .current-year { display: none; }
  .glass-header .px-4 { padding-left: 0.7rem; padding-right: 0.7rem; }
  .recommendation-card-header { display: block; }
  .recommendation-card-price {
    display: block;
    margin-top: 0.45rem;
    text-align: left;
    white-space: normal;
  }
  #compare-dock { align-items: stretch; }
  #compare-dock > div { flex-direction: column; align-items: stretch; }
  #compare-dock-action, #compare-dock-clear { width: 100%; }
}

@media (min-width: 768px) {
  body { padding-bottom: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  body { padding: 0; background: #fff; color: #0f172a; }
  header, nav, button, .retailer-details, .compare-model, #compare-dock, .app-toast,
  #model-filter-tabs, #model-search, #model-feature-filter, #print-shortlist,
  #model-budget-range, #model-min-price, #model-sort { display: none !important; }
  main > section { display: block !important; }
  #sec-models { margin: 0; }
  #models-list-container { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #models-list-container > div { break-inside: avoid; box-shadow: none; }
}
