.theme-light {
  --primary-accent: #e45529;
  --primary-dark: #212121;
  --secondary-accent: #b0b0b0;
  --background: #ffffff;
  --highlight: #e45529;
  --cta: #e45529;
  --cta-hover: #ff6a35;
  --text: #212121;
  --text-muted: #666666;
  --select: #f4f4f4;
  --headlink: #fff;
  --code: #ddd;
  --affiliate-box: #fff;
}

.theme-dark {
  --primary-accent: #bfbfbf;
  --primary-dark: #121212;
  --secondary-accent: #b0b0b0;
  --background: #19191b;
  --highlight: #423d3b;
  --cta: #e45529;
  --cta-hover: #ff6a35;
  --text: #e0e0e0;
  --text-muted: #b0b0b0;
  --select: #e0e0e0;
  --headlink: #e45529;
  --code: #444;
  --affiliate-box: #423d3b;
}

.recommend-box {
  margin: 1.5rem 0;
  padding: 1rem;
  border-left: 4px solid var(--cta);
  font-size: 0.95rem;
  line-height: 1.4;
  border-radius: 4px;
  background-color: var(--primary-dark);
  color: var(--text);
}

.theme-light .recommend-box {
  background-color: var(--select); /* light gray */
  color: var(--text);
}

.theme-dark .recommend-box {
  background-color: var(--primary-dark); /* your dark background */
  color: var(--text);
}

.recommend-box a {
  color: var(--cta);
  text-decoration: underline;
  font-weight: 700;
}

html.no-transition *,
html.no-transition {
  transition: none !important;
}

:root {
  transition: background-color 0.5s ease, color 0.5s ease;
}

body {
  background-color: var(--background);
  color: var(--text);
  font-family: sans-serif;
  margin: 0;
  padding: 2rem;
  transition: background-color 0.5s ease, color 0.5s ease;
}

h1,
h2 {
  color: var(--primary-accent);
  transition: color 0.5s ease;
}

p {
  margin: 0;
  line-height: 1.6;
  color: var(--text);
  transition: color 0.5s ease;
}

.center {
  text-align: center;
}

input,
select,
button {
  margin: 0;
  color: #fff;
  padding: 13px;
  border: none;
  border-radius: 6px;
  transition: background-color 0.5s ease, color 0.5s ease;
}

input,
select {
  background-color: var(--select);
  color: var(--primary-dark);
  border: #999 solid 1px;
  font-size: 16px;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

input::placeholder {
  color: #888;
}

button {
  background-color: var(--cta);
  cursor: pointer;
  font-weight: 800;
  color: #fff;
}
button:hover {
  background-color: var(--cta-hover);
}
.container {
  max-width: 900px;
  margin: auto;
}

code {
  background: var(--code);
  padding: 5px;
}

.section {
  margin-top: 2rem;
}

.disclaimer {
  margin-top: 4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.5s ease;
  font-style: italic;
}

.note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.dim {
  margin-top: 1rem;
  color: var(--text-muted);
}

.drive-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.drive-row label {
  flex: 0.4 0 10px;
  text-align: right;
  margin-right: 0.5rem;
}

.size-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.size-row label {
  flex: 1.5 0 10px;
  text-align: right;
  margin-right: 0.5rem;
}

.drive-input-group {
  display: flex;
  flex: 2 1 0;
  gap: 0.5rem;
  align-items: center;
}

.drive-input-group input {
  flex: 2 1 0;
  min-width: 0;
}

.drive-input-group select {
  flex: 1 1 0;
  min-width: 0;
}

.cta-button {
  background: var(--cta);
  color: #fff;
  padding: 12px 24px;
  font-size: 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
  background: var(--cta-hover);
}

.rec-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}
.rec-card {
  background: #222;
  padding: 1rem;
  border-radius: 0.5rem;
  text-align: center;
}
.rec-card img {
  max-width: 80px;
  margin-bottom: 0.5rem;
}
.rec-card a {
  display: inline-block;
  margin-top: 0.5rem;
  background: #e45529;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.3rem;
  text-decoration: none;
  font-weight: bold;
}

@media (max-width: 600px) {
  .container {
    padding: 0 0.5rem;
  }

  .drive-row {
    flex-direction: column;
    align-items: stretch;
  }

  .drive-row label {
    text-align: left;
    margin-bottom: 0.25rem;
    margin-right: 0;
  }

  .drive-input-group {
    flex-direction: row;
    gap: 0.5rem;
    width: 100%;
  }

  .drive-input-group input,
  .drive-input-group select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
}
.quick-picks {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}
.quick-picks th,
.quick-picks td {
  border: 1px solid var(--primary-dark);
  padding: 0.5rem;
}
.quick-picks th {
  background: var(--highlight);
  color: #fff;
}
.learn-btn {
  display: flex;
  margin: 1.5rem 0 2rem;
  padding: 0.75rem 1.25rem;
  background: #e45529;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: background 0.3s ease, transform 0.2s ease;
  justify-content: center;
  cursor: pointer;
}

.learn-more-btn {
  background: var(--cta);
  color: var(--text);
  border: none;
  border-radius: 4px;
  padding: 0.25rem 0.75rem;
  cursor: pointer;
}

.affiliate-box {
  background: var(--affiliate-box);
  color: #fff;
  padding: 1.5rem 1.5rem 2rem;
  border-radius: 8px;
  border: #423d3b solid 0.3px;
  text-align: center;
  margin: 2rem auto;
  max-width: 700px;
}

.affiliate-box img {
  max-height: 80px;
  margin-bottom: 1.25rem;
  display: none;
}

.affiliate-box a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

/* Show/hide logos based on theme */
.theme-dark .affiliate-box .dark-mode {
  display: inline-block;
}
.theme-light .affiliate-box .light-mode {
  display: inline-block;
}

.affiliate-title {
  margin: 0 auto 1.25rem;
  color: var(--text);
}

.affiliate-box p {
  font-size: 1rem;
  margin: 0.75rem 0;
  color: #e45529;
  text-decoration-line: none;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.popup {
  background: var(--background);
  color: var(--text);
  padding: 1rem;
  border-radius: 0.5rem;
  max-width: 500px;
  width: 90%;
}

.carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 800px;
  margin: auto;
}

.carousel-track-wrapper {
  overflow: hidden;
  width: 100%;
}

.recommendations-carousel {
  display: flex;
  transition: transform 0.4s ease;
  gap: 1rem;
  will-change: transform;
}

.recommendations-carousel.centered {
  justify-content: center;
}

.drive-card {
  flex: 0 0 200px;
  background: var(--background);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  border: solid 0.3px;
}

.drive-btn {
  background: #e45529;
  color: #fff;
  padding: 0.6rem 1rem;
  text-align: center;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.drive-btn:hover {
  background: #ff6f3c;
}

.drive-tier {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  text-align: center;
}

.drive-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.drive-icon {
  flex: 0 0 50%;
  height: 140px;
  background: url(/images/drive-icon.svg) no-repeat center / contain;
  border-radius: 4px;
  position: relative;
}

.drive-icon-link {
  display: block;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
}

.drive-icon-link .drive-icon {
  height: 140px;
  width: 100px;
  background: url(/images/drive-icon.svg) no-repeat center / contain;
  position: relative;
}

.drive-name {
  color: #fff;
  position: absolute;
  top: 22px;
  left: 15px;
  width: 70%;
  text-align: center;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  line-height: 1.1rem;
}

.drive-size {
  color: #fff;
  position: absolute;
  bottom: 15px;
  width: 100%;
  text-align: center;
  font-size: 1.3rem;
  font-weight: bold;
}

.breath {
  padding-top: 20px;
  padding-bottom: 20px;
}

.drive-size .drive-unit {
  font-size: 0.7rem;
  font-weight: normal;
  margin-left: 2px;
}

.drive-title {
  flex: 1;
  font-size: 0.85rem;
  text-align: left;
  line-height: 1.2rem;
}

.tips-list {
  list-style-type: disc;
  padding-left: 1.2em;
  margin: 0;
}

.tips-list li {
  margin-bottom: 0.75em;
  line-height: 1.5em;
}

.tips-list li:last-child {
  margin-bottom: 0;
}

.carousel-btn {
  background: #e45529;
  border: none;
  color: #fff;
  font-size: 2rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
}

.carousel-btn:hover {
  background: #ff6f3c;
}

.carousel-btn.prev {
  margin-right: 0.5rem;
  padding-top: 0;
}
.carousel-btn.next {
  margin-left: 0.5rem;
  padding-top: 0;
}

.tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  font-size: X-LARGE;
  line-height: 2;
}

.small {
  text-decoration: none;
  font-weight: initial;
  font-size: initial;
  line-height: 1;
}

.tooltip-text {
  visibility: hidden;
  opacity: 0;
  width: 400px;
  background-color: var(--primary-dark);
  color: #fff;
  text-align: left;
  padding: 0.75rem;
  border-radius: 6px;
  position: absolute;
  z-index: 1;
  top: 130%;
  left: 0;
  transition: opacity 0.3s ease;
  font-size: 1.4rem;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tooltip:hover .tooltip-text,
.tooltip.show .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.warning-message {
  background: rgba(255, 111, 60, 0.15);
  border: 1px solid #ff6f3c;
  color: #ff6f3c;
  padding: 0.75rem;
  border-radius: 6px;
  margin-top: 1rem;
  font-weight: bold;
  font-size: 0.95rem;
}

.link {
  color: #e45529;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.link:hover {
  text-decoration: underline;
}

thead .link,
.article-card .link {
  color: var(--headlink);
}

/* Article-specific styling */
.article-card {
  background: var(--highlight);
  border: none;
  color: #fff;
}

.article-card h3.article-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.article-card .drive-title {
  color: #f4f4f4;
  margin: 5px 0 20px 0;
}

.article-card .drive-btn {
  background: #fff;
  color: var(--cta);
  font-weight: 800;
}
.article-card .drive-btn:hover {
  background: #ff6f3c;
  color: #fff;
}

footer {
  margin-top: 3rem;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  background-color: var(--background);
  border-top: 1px solid var(--secondary-accent);
}

footer a {
  color: var(--cta);
  font-weight: bold;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

footer p {
  margin: 0.5rem 0;
}

footer p:last-child {
  margin-top: 1rem; /* adds space before the copyright/privacy section */
}

/* 📱 Mobile adjustments */
@media (max-width: 600px) {
  .tooltip-text {
    font-size: 1rem;
    padding: 1rem;
    width: 90vw;
    max-width: 320px;
  }

  .tooltip::after {
    content: "ℹ️";
    font-size: 1.6rem;
    margin-left: 0.25rem;
    opacity: 0.8;
  }
}
