/* Smooth dark mode transitions */
html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- Layout --- */

.hh-header {
  width: 100%;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.hh-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

/* --- Logo --- */
.hh-logo img {
  height: 48px;
}

.hh-logo-dark { display: none; }

/* --- Search Bar --- */
.hh-search {
  flex: 1;
  max-width: 420px;
}

.hh-search input {
  width: 100%;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.95rem;
}

/* --- Actions --- */
.hh-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Dropdown container — anchor point for the floating menu */
.hh-dropdown {
  position: relative;
  display: inline-block;
}

/* The Menu button */
.hh-dropdown summary {
  cursor: pointer;
  padding: 0.5rem 1rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  color: var(--text);
  list-style: none;
  user-select: none;
}

/* Remove default disclosure triangle */
.hh-dropdown summary::-webkit-details-marker {
  display: none;
}

/* Floating dropdown menu */
.hh-dropdown-menu {
  position: absolute;
  top: 100%;              /* directly below the button */
  right: 0;               /* align to right edge */
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 0.5rem 0;
  min-width: 10rem;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Menu links */
.hh-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text);
  text-decoration: none;
}

/* Hover state */
.hh-dropdown-menu a:hover {
  background: var(--hover);
}

/* Prevent layout shift when opening */
.hh-dropdown[open] > summary {
  background: var(--input-bg);
}


/* --- Dark Mode Toggle --- */
.hh-dark-toggle input {
  display: none;
}

.hh-dark-toggle .hh-toggle-icon {
  cursor: pointer;
  font-size: 1.3rem;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
  background: var(--button-bg);
  border: 1px solid var(--border);
}

/* --- Dark Mode Variables --- */
:root {
  --bg: #ffffff;
  --text: #111111;
  --border: #e2e2e2;
  --hover: #f3f3f3;
  --button-bg: #f7f7f7;
  --input-bg: #fafafa;
}

#darkmode-toggle:checked ~ * {
  --bg: #0f172a;
  --text: #e2e8f0;
  --border: #334155;
  --hover: #1e293b;
  --button-bg: #1e293b;
  --input-bg: #1e293b;
}

/* Swap logos */
#darkmode-toggle:checked ~ .hh-header .hh-logo-light { display: none; }
#darkmode-toggle:checked ~ .hh-header .hh-logo-dark { display: block; }

/* --- Mobile --- */
@media (max-width: 700px) {
  .hh-container {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .hh-actions {
    justify-content: space-between;
  }
}

/* Card hover effect */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}


/* --- Error Code Hub Hero --- */
.ech-hero {
  text-align: center;
  padding: 2.5rem 1rem;
  margin: 0 auto 2rem;
  max-width: 800px;
}

.ech-hero h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.ech-hero-text {
  font-size: 1.1rem;
  color: var(--text);
  opacity: 0.85;
  line-height: 1.6;
}

/* --- Sections --- */
.ech-section {
  margin: 2.5rem auto;
  max-width: 1100px;
  padding: 0 1.25rem;
}

.ech-section h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

/* --- Grid Layout --- */
.ech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

/* --- Cards --- */
.ech-card {
  display: block;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ech-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* --- Button --- */
.ech-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--button-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ech-button:hover {
  background: var(--hover);
  transform: translateY(-2px);
}


/* <---- BRAND GRID PAGES -----> */

/* GRID */
.echb-brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  margin: 2rem auto;
  max-width: 1000px;
  width: 100%;
}

/* CARD */
.echb-brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 24px;
  min-height: 140px;

  background-color: #fafafa; /* subtle contrast */
  border: 1px solid rgba(0,0,0,0.12); /* visible border */
  border-radius: 12px;

  box-shadow: 0 1px 3px rgba(0,0,0,0.08); /* default shadow */

  max-width: 180px;
  margin: 0 auto;

  text-align: center;
  text-decoration: none;

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.echb-brand-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.12); /* stronger hover */
}

.dark .echb-brand-card {
  background-color: #ffffff;
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* LOGO */
.echb-brand-logo img {
  max-width: 120px;
  max-height: 60px;
  object-fit: contain;
}





/* <---- APPLIANCE GRID (echa) ----> */

/* GRID */
.echa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  margin: 2rem auto;
  max-width: 1000px;
  width: 100%;
  padding: 1rem;
}

/* CARD */
.echa-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 24px;
  min-height: 160px;

  background-color: #ffffff;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;

  box-shadow: 0 1px 3px rgba(0,0,0,0.08);

  text-align: center;
  text-decoration: none;

  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.echa-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* DARK MODE */
.dark .echa-card {
  background-color: #1f1f1f;
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* ICON */
.echa-icon img {
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
  margin-bottom: 12px;
}

/* LABEL */
.echa-label {
  font-weight: 600;
  font-size: 1rem;
  color: var(--huskyText-light);
}

.dark .echa-label {
  color: var(--huskyText-dark);
}

.echa-label {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
  margin-top: 8px;
  color: var(--huskyText-light);
  text-align: center;
}

.dark .echa-label {
  color: var(--huskyText-dark);
}

/* Heading */
.echa-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 0.25rem;
  color: var(--huskyText-light);
  text-align: center;
}

/* Subheading */
.echa-subtitle {
  font-size: 1.05rem;
  font-weight: 400;
  opacity: 0.85;
  margin-bottom: 2.2rem;
  color: var(--huskyText-light);
  text-align: center;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* Dark mode */
.dark .echa-title,
.dark .echa-subtitle {
  color: var(--huskyText-dark);
}


/* <---- ERROR CODE HUB PAGE = echp ----> */
/* INTRO SECTION */
.echp-title {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
  color: var(--huskyText-light);
}

.dark .echp-title {
  color: var(--huskyText-dark);
}

.echp-subtitle {
  font-size: 2rem;
  opacity: 0.85;
  max-width: 700px;
  line-height: 1.55;
  margin-bottom: 2rem;
}

/* MAIN CONTENT CARD */
.echp-article {
  margin-top: 2rem;
  margin-bottom: 3rem;
}

/* Dark mode version */
.dark .echp-article {
  background: #1f1f1f;          /* clean dark block */
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.echp-header {
  background: #ffffff;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 2rem;
}

.dark .echp-header {
  background: #1f1f1f;
}


/* Meaning Icon */
.echp-meaning-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Section Titles */
.echp-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.echp-section,
.echp-grid {
  background: #ffffff;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 2rem;
}

/* Dark mode */
.dark .echp-section,
.dark .echp-grid {
  background: #1f1f1f;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Strong Text */
.echp-strong {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Grid Layout */
.echp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.echp-column {
  display: flex;
  flex-direction: column;
}

/* Lists */
.echp-list {
  list-style: none;
  padding-left: 0;
}

.echp-list li {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
}

/* Icon Lists */
.echp-icon-list.blue li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: #2563eb;
  font-weight: bold;
}

.echp-icon-list.orange li::before {
  content: "⚠";
  position: absolute;
  left: 0;
  color: #f97316;
  font-weight: bold;
}

/* Disclaimer */
.echp-disclaimer {
  font-size: 0.9rem;
  opacity: 0.7;
  max-width: 700px;
  line-height: 1.5;
}

/* Card wrapper */
.echp-card {
  background: #ffffff;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 2rem;
}

.dark .echp-card {
  background: #1f1f1f;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Card wrapper */
.echp-card {
  background: #ffffff;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 2rem;
}

.dark .echp-card {
  background: #1f1f1f;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Card header with icon */
.echp-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.echp-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.echp-icon.blue {
  color: #2563eb;
}

.echp-icon.orange {
  color: #f97316;
}

/* <----- ERROR CODE HUB TABLE ------>  */

.echt-title {
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin-bottom: 0.75rem;
  color: var(--huskyText-light);
}

.dark .echt-title {
  color: var(--huskyText-dark);
}

.echt-description {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 700px;
  line-height: 1.55;
  margin-bottom: 2rem;
}

.echt-card {
  background: #ffffff;
  padding: 2rem 2.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 2rem;
}

.dark .echt-card {
  background: #1f1f1f;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.echt-card-header {
  margin-bottom: 1rem;
}

.echt-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  font-size: 1rem;
}

.echt-table thead th {
  text-align: left;
  padding: 16px 18px;
  background: var(--huskyGray-light);
  color: var(--huskyText-light);
  font-weight: 700;
  border-bottom: 2px solid var(--color-border);
}

.dark .echt-table thead th {
  background: var(--huskyGray-dark);
  color: var(--huskyText-dark);
}

.echt-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  line-height: 1.45;
}

.echt-table tbody tr:hover td {
  background: rgba(0,0,0,0.04);
}

.dark .echt-table tbody tr:hover td {
  background: rgba(255,255,255,0.05);
}

.echt-table td a {
  color: var(--huskyAccent, #2563eb) !important;
  font-weight: 700;
  text-decoration: underline;
}

.echt-table td a:hover {
  color: #1d4ed8 !important;
}

.dark .echt-table td a {
  color: #f97316 !important;
}

.dark .echt-table td a:hover {
  color: #fb923c !important;
}

