/*
  Handwritten shell styles for directory routes (/a/* and /subcategory/*).
  This file replaces Tailwind dependency for shared header/emergency/footer UI.
*/

:root {
  --directory-sticky-offset: 3rem;
  --shell-sky-600: #0284c7;
  --shell-sky-700: #0369a1;
  --shell-sky-800: #075985;
  --shell-gray-50: #f9fafb;
  --shell-gray-100: #f3f4f6;
  --shell-gray-200: #e5e7eb;
  --shell-gray-300: #d1d5db;
  --shell-gray-600: #4b5563;
  --shell-gray-700: #374151;
  --shell-gray-900: #111827;
  --shell-emerald-100: #d1fae5;
  --shell-emerald-200: #a7f3d0;
  --shell-emerald-500: #10b981;
  --shell-emerald-700: #047857;
  --shell-emerald-800: #065f46;
  --shell-yellow-400: #facc15;
}

/* ==========================================================================
   Handwritten shell utility shims used by header/banner/cookie/footer/modal.
   ========================================================================== */
.hidden {
  display: none;
}

.block {
  display: block;
}

.inline {
  display: inline;
}

.inline-flex {
  display: inline-flex;
}

.flex {
  display: flex;
}

.grid {
  display: grid;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.flex-nowrap {
  flex-wrap: nowrap;
}

.flex-1 {
  flex: 1 1 0%;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.w-full {
  width: 100%;
}

.w-4 {
  width: 1rem;
}

.h-4 {
  height: 1rem;
}

.w-5 {
  width: 1.25rem;
}

.h-5 {
  height: 1.25rem;
}

.w-12 {
  width: 3rem;
}

.h-12 {
  height: 3rem;
}

.w-\[18px\] {
  width: 18px;
}

.h-\[18px\] {
  height: 18px;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.whitespace-nowrap {
  white-space: nowrap;
}

.list-none {
  list-style: none;
}

.m-0 {
  margin: 0;
}

.p-0 {
  padding: 0;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.max-w-7xl {
  max-width: 80rem;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 640px) {
  .sm\:hidden {
    display: none;
  }

  .sm\:inline {
    display: inline;
  }

  .sm\:inline-flex {
    display: inline-flex;
  }

  .sm\:flex {
    display: flex;
  }

  .sm\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .md\:hidden {
    display: none;
  }

  .md\:block {
    display: block;
  }

  .md\:inline {
    display: inline;
  }

  .md\:flex {
    display: flex;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Skip link behavior without Tailwind base stylesheet. */
.skip-links {
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 10000;
}

.skip-link {
  background: #111827;
  border: 2px solid #fff;
  border-radius: 0.5rem;
  color: #fff;
  left: -9999px;
  min-height: 44px;
  min-width: 44px;
  padding: 0.6rem 1rem;
  position: absolute;
  text-decoration: none;
}

.skip-link:focus,
.skip-link:focus-visible {
  left: 0.5rem;
  outline: 3px solid var(--shell-yellow-400);
  outline-offset: 2px;
  top: 0.5rem;
  z-index: 10001;
}

/* Emergency banner */
#emergencyBanner {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: linear-gradient(to right, #1a1a2e, #16213e);
  color: #fff;
  border-bottom: 1px solid var(--shell-yellow-400);
  box-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.22);
  padding-block: 0.0625rem;
}

#emergencyBanner.hidden {
  display: none;
}

#emergencyBanner .directory-emergency-inner {
  position: relative;
  max-width: 80rem;
  margin-inline: auto;
  padding: 0.25rem 2.75rem 0.25rem 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

#emergencyBanner a {
  text-decoration: none;
}

#dismissEmergencyBanner {
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.875rem;
  min-height: 1.875rem;
  padding: 0.125rem;
  border-radius: 0.25rem;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: 0;
  cursor: pointer;
}

#dismissEmergencyBanner:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

#emergencyBanner a[href^="tel:"] {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  min-height: 1.875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.3125rem;
  background: var(--shell-yellow-400);
  color: #1a1a2e;
  font-weight: 700;
}

#emergencyBanner a[href*="#text-contact-title"],
#emergencyBanner a[href="/emergency"] {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 1.875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.3125rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-weight: 600;
}

#restoreEmergencyBanner {
  position: fixed;
  top: 0;
  right: 1rem;
  z-index: 1100;
  background: var(--shell-sky-800);
  color: #fff;
  padding: 0.1875rem 0.625rem;
  border-radius: 0 0 0.375rem 0.375rem;
  border: 0;
  min-width: 36px;
  min-height: 36px;
  cursor: pointer;
}

#restoreEmergencyBanner.hidden {
  display: none;
}

#restoreEmergencyBanner:hover {
  background: var(--shell-sky-700);
}

/* Global loading indicator used by app-core directory runtime. */
#global-loading-indicator {
  display: none;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 9999;
}

#global-loading-indicator.active {
  display: block;
}

#global-loading-indicator .global-loading-bar {
  animation: global-loading-bar 1.5s ease-in-out infinite;
  background: var(--shell-sky-600);
  display: block;
  height: 4px;
}

@keyframes global-loading-bar {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}

@media (min-width: 640px) {
  .sm\:w-5 {
    width: 1.25rem !important;
  }

  .sm\:h-5 {
    height: 1.25rem !important;
  }

  .sm\:w-16 {
    width: 4rem !important;
  }

  .sm\:h-16 {
    height: 4rem !important;
  }

  #emergencyBanner .directory-emergency-inner {
    padding: 0.25rem 3rem 0.25rem 0.625rem;
    gap: 0.375rem;
  }
}

/* Utility shims used in shell markup for responsive visibility */
#emergencyBanner .hidden.sm\:flex {
  display: none;
}

@media (min-width: 640px) {
  #emergencyBanner .hidden.sm\:flex {
    display: inline-flex !important;
  }

  #emergencyBanner .sm\:hidden {
    display: none !important;
  }

  #emergencyBanner .sm\:inline {
    display: inline !important;
  }
}

@media (min-width: 768px) {
  .md\:w-20 {
    width: 5rem !important;
  }

  .md\:h-20 {
    height: 5rem !important;
  }

  #emergencyBanner .hidden.md\:inline {
    display: inline !important;
  }
}

/* Header/navigation shell */
#navigation {
  position: sticky;
  top: var(--directory-sticky-offset, 0px);
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--shell-gray-100);
}

#emergencyBanner.hidden + #restoreEmergencyBanner + #navigation {
  top: 0;
}

#navigation .directory-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 80rem;
  margin-inline: auto;
  padding: 0.375rem 0.625rem;
}

#navigation picture img {
  width: 34px !important;
  height: 34px !important;
  display: block;
}

#main-menubar {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
}

#main-menubar a {
  display: block;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--shell-gray-600);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

#main-menubar a:hover {
  color: var(--shell-sky-600);
  background: var(--shell-gray-100);
}

#desktopNavActions {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

#desktopNavActions a,
#desktopNavActions button {
  text-decoration: none;
}

#desktopNavActions > a {
  align-items: center;
  border-radius: 0.5rem;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 600;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
}

#desktopNavActions > a[href="/user/create-account"] {
  background: var(--shell-sky-700);
  color: #fff;
}

#desktopNavActions > a[href="/user/create-account"]:hover {
  background: var(--shell-sky-800);
}

#desktopNavActions > a[href="/user-login"] {
  background: #fff;
  border: 1px solid var(--shell-gray-300);
  color: var(--shell-gray-700);
}

#desktopNavActions > a[href="/user-login"]:hover {
  border-color: var(--shell-sky-600);
  color: var(--shell-sky-600);
}

#mobileMenuToggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

#mobileMenu {
  display: none;
  left: 0;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 900;
}

#mobileMenu.mobile-menu-open {
  display: flex !important;
}

#mobileMenuToggle.menu-open #menuBar1 {
  transform: translateY(8px) rotate(45deg);
}

#mobileMenuToggle.menu-open #menuBar2 {
  opacity: 0;
}

#mobileMenuToggle.menu-open #menuBar3 {
  transform: translateY(-8px) rotate(-45deg);
}

#search {
  display: none !important;
  border-top: 1px solid var(--shell-gray-100);
  background: rgba(249, 250, 251, 0.8);
}

#search form {
  max-width: 80rem;
  margin-inline: auto;
  padding: 0.3125rem 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

#search input[type="text"] {
  flex: 1;
  min-height: 40px;
  border: 1px solid var(--shell-gray-300);
  border-radius: 0.4375rem;
  padding: 0.375rem 0.6875rem;
  font-size: 0.9375rem;
}

#search button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.375rem 0.875rem;
  border: 0;
  border-radius: 0.4375rem;
  background: var(--shell-sky-600);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

#search button[type="submit"]:hover {
  background: var(--shell-sky-700);
}

/* Header dropdown controls. */
.dropdown {
  position: relative;
}

#userDropdownBtn {
  align-items: center;
  background: #fff;
  border: 1px solid var(--shell-gray-300);
  border-radius: 0.5rem;
  color: var(--shell-gray-700);
  cursor: pointer;
  display: inline-flex;
  font-weight: 500;
  gap: 0.25rem;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
}

#userDropdownBtn:hover {
  border-color: var(--shell-sky-600);
  color: var(--shell-sky-600);
}

#userDropdownMenu {
  background: #fff;
  border: 1px solid var(--shell-gray-200);
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  display: none;
  min-width: 10rem;
  padding: 0.5rem 0;
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 1000;
}

#userDropdownMenu.show {
  display: block;
}

#userDropdownMenu[hidden] {
  display: none;
}

#userDropdownMenu a,
#userDropdownMenu button {
  background: transparent;
  border: 0;
  color: var(--shell-gray-600);
  display: block;
  min-height: 44px;
  padding: 0.5rem 1rem;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

#userDropdownMenu a:hover,
#userDropdownMenu button:hover {
  background: var(--shell-gray-100);
  color: var(--shell-sky-800);
}

/* Preserve existing keyboard/mouse menu behavior from removed inline styles. */
.dropdown:focus-within [role="menu"],
[role="menu"]:hover,
[role="menu"].show {
  display: block;
}

/* Language switcher */
#languageSwitcherBtn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--shell-gray-300);
  border-radius: 0.375rem;
  background: transparent;
  color: var(--shell-gray-600);
  font-weight: 500;
  cursor: pointer;
}

#languageSwitcherBtn:hover {
  border-color: var(--shell-sky-600);
  color: var(--shell-sky-600);
}

#languageSwitcherBtn svg:first-child {
  height: 18px;
  width: 18px;
}

#languageSwitcherBtn svg:last-child {
  height: 12px;
  width: 12px;
}

#languageSwitcherMenu {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  z-index: 1000;
  min-width: 180px;
  padding: 0.25rem;
  margin: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--shell-gray-300);
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

#languageSwitcherMenu button {
  width: 100%;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--shell-gray-600);
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
}

#languageSwitcherMenu button:hover {
  background: var(--shell-gray-50);
}

/* Mobile menu */
#mobileMenuContent {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 900;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: #fff;
  border-top: 1px solid var(--shell-gray-200);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

#mobileMenuContent a,
#mobileMenuContent button {
  display: block;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-bottom: 1px solid var(--shell-gray-100);
  padding: 0.75rem 0;
  background: transparent;
  color: var(--shell-gray-600);
  text-align: left;
  text-decoration: none;
}

#mobileMenuContent a:hover,
#mobileMenuContent button:hover {
  background: var(--shell-gray-50);
  color: var(--shell-sky-800);
}

#mobileMenuContent [role="separator"] {
  border-top: 1px solid var(--shell-gray-200);
  margin: 0.5rem 0;
}

#mobileMenuContent [aria-label="Language selection"] {
  padding-top: 0.5rem;
}

#mobileMenuContent [aria-label="Language selection"] > span {
  color: var(--shell-gray-600);
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

#mobileMenuContent [aria-label="Language selection"] > div {
  display: flex;
  gap: 0.5rem;
}

#mobileMenuContent [aria-label="Language selection"] form {
  flex: 1;
}

#mobileMenuContent [aria-label="Language selection"] button {
  align-items: center;
  border-radius: 0.375rem;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 600;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
}

#mobileMenuContent [aria-label="Language selection"] button[aria-current="true"] {
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
  color: #0c4a6e;
}

#mobileMenuContent [aria-label="Language selection"] button:not([aria-current="true"]) {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: var(--shell-gray-600);
}

#mobileMenuContent [aria-label="Language selection"] button:not([aria-current="true"]):hover {
  background: #e5e7eb;
}

/* Trader card component styles for directory routes. */
.directory-page-shell .trader-card-modern {
  position: relative;
  background: #fff;
  border: 1px solid #d4e2f1;
  border-radius: 1rem;
  box-shadow: 0 14px 26px -24px rgba(2, 19, 43, 0.62);
  padding: 1.5rem;
}

@media (min-width: 640px) {
  .directory-page-shell .trader-card-modern {
    padding: 2rem;
  }
}

.directory-page-shell .trader-card-header-modern {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.directory-page-shell .tc-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.directory-page-shell .tc-avatar {
  width: 5.5rem;
  height: 5.5rem;
  border: 4px solid #f3f4f6;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

.directory-page-shell .tc-avatar-fallback {
  width: 5.5rem;
  height: 5.5rem;
  border: 4px solid #f3f4f6;
  border-radius: 1rem;
  background: linear-gradient(to bottom right, #f0f9ff, #dbeafe);
  display: flex;
  align-items: center;
  justify-content: center;
}

.directory-page-shell .trader-card-status-badge {
  position: absolute;
  right: -0.25rem;
  bottom: -0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid #fff;
  border-radius: 9999px;
  background: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
}

.directory-page-shell .trader-card-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #fff;
}

.directory-page-shell .trader-card-info {
  flex: 1;
  min-width: 0;
}

.directory-page-shell .trader-card-name {
  margin: 0 0 0.5rem;
  color: #111827;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

@media (min-width: 640px) {
  .directory-page-shell .trader-card-name {
    font-size: 1.5rem;
  }
}

.directory-page-shell .trader-card-name-link {
  color: #0b2e4f;
  text-decoration: none;
  transition: color 0.15s ease;
}

.directory-page-shell .trader-card-name-link:hover {
  color: #0369a1;
}

.directory-page-shell .trader-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  color: #4b5563;
  font-size: 1rem;
}

.directory-page-shell .trader-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.directory-page-shell .trader-card-certs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}

.directory-page-shell .trader-card-cert-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  background: #ecfdf5;
  color: #065f46;
  font-size: 0.875rem;
}

.directory-page-shell .trader-card-trust-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.directory-page-shell .trader-card-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.875rem;
}

.directory-page-shell .trader-card-trust-time {
  background: #fef3c7;
  color: #92400e;
}

.directory-page-shell .trader-card-trust-price {
  background: #dbeafe;
  color: #1e40af;
}

.directory-page-shell .trader-card-trust-insured {
  background: #dcfce7;
  color: #166534;
}

.directory-page-shell .trader-card-trust-guarantee {
  background: #f3e8ff;
  color: #6b21a8;
}

.directory-page-shell .trader-card-description {
  margin: 0 0 1.25rem;
  color: #4b5563;
  line-height: 1.625;
}

.directory-page-shell .trader-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.directory-page-shell .trader-card-btn-call,
.directory-page-shell .trader-card-btn-quote,
.directory-page-shell .trader-card-btn-profile {
  min-height: 48px;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.directory-page-shell .trader-card-btn-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #0c4a6e 0%, #0e7490 100%);
  box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.3);
  color: #fff;
  font-weight: 700;
}

.directory-page-shell .trader-card-btn-call:hover {
  background: linear-gradient(135deg, #0b3c5b 0%, #0c637a 100%);
}

.directory-page-shell .trader-card-btn-quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f1f6fd;
  border: 1px solid #bfd4ea;
  color: #0c4a6e;
  font-weight: 600;
}

.directory-page-shell .trader-card-btn-quote:hover {
  background: #e3eefb;
}

.directory-page-shell .trader-card-btn-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.75rem 1rem;
  border: 1px solid #bfd4ea;
  color: #0b3f66;
  font-weight: 500;
}

.directory-page-shell .trader-card-btn-profile:hover {
  border-color: #0b8ac3;
  color: #075985;
}

.directory-page-shell .trader-card-premium-ribbon {
  position: absolute;
  top: -1px;
  right: -1px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0 1rem 0 1rem;
  background: linear-gradient(to right, #f59e0b, #f97316);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  color: #fff;
  font-size: 0.875rem;
}

/* Utility shims used by trader_card.html when Tailwind is disabled. */
.directory-page-shell .w-4 { width: 1rem; }
.directory-page-shell .h-4 { height: 1rem; }
.directory-page-shell .w-5 { width: 1.25rem; }
.directory-page-shell .h-5 { height: 1.25rem; }
.directory-page-shell .w-6 { width: 1.5rem; }
.directory-page-shell .h-6 { height: 1.5rem; }
.directory-page-shell .text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.directory-page-shell .text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.directory-page-shell .font-medium { font-weight: 500; }
.directory-page-shell .font-semibold { font-weight: 600; }
.directory-page-shell .font-bold { font-weight: 700; }
.directory-page-shell .flex-shrink-0 { flex-shrink: 0; }
.directory-page-shell .text-sky-600 { color: var(--shell-sky-600); }
.directory-page-shell .text-gray-600 { color: var(--shell-gray-600); }
.directory-page-shell .text-amber-500 { color: #f59e0b; }
.directory-page-shell .transition-transform { transition: transform 0.15s ease; }
.directory-page-shell .group:hover .group-hover\:translate-x-1 { transform: translateX(0.25rem); }

/* Footer shell */
#footer.directory-shell-footer {
  background: var(--shell-gray-900);
  color: var(--shell-gray-600);
  padding: 3rem 0;
}

#footer.directory-shell-footer > div {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

#footer .directory-footer-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--shell-gray-200);
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 1.5rem;
}

#footer .directory-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

#footer h2,
#footer h3 {
  color: var(--shell-gray-900);
  margin: 0;
}

#footer p {
  color: var(--shell-gray-600);
}

#footer .footer-pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid var(--shell-gray-200);
  background: var(--shell-gray-100);
  color: var(--shell-gray-900);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

#footer .directory-footer-card > .h-1,
#footer .directory-footer-card > div:first-child {
  background: linear-gradient(to right, #34d399, #38bdf8, #facc15);
  border-radius: 9999px;
  height: 4px;
}

#footer .footer-pill:hover {
  background: var(--shell-emerald-100);
  color: var(--shell-emerald-800);
  transform: translateY(-2px);
}

#footer .area-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--shell-gray-200);
  background: var(--shell-gray-100);
  color: var(--shell-emerald-800);
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

#footer .area-link:hover {
  background: var(--shell-emerald-100);
  transform: translateY(-2px);
}

#footer .directory-footer-emergency {
  border-radius: 0.75rem;
  border: 1px solid rgba(250, 204, 21, 0.3);
  background: linear-gradient(to right, #16213e, #1a1a2e);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

#footer .directory-footer-emergency h3,
#footer .directory-footer-emergency p {
  color: #fff;
}

#footer .directory-footer-emergency a {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  background: var(--shell-yellow-400);
  color: #1a1a2e;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

#footer nav[aria-label="Legal and policy links"] {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

#footer .directory-footer-legal-wrap {
  row-gap: 0.5rem;
}

#footer nav[aria-label="Legal and policy links"] a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 0.25rem;
  line-height: 1.5;
  color: var(--shell-gray-600);
  text-decoration: none;
}

#footer nav[aria-label="Legal and policy links"] a:hover {
  color: var(--shell-gray-900);
}

#footer nav[aria-label="Legal and policy links"] span {
  color: var(--shell-gray-600);
  font-size: 0.875rem;
}

#footer .directory-footer-emergency .text-left h3,
#footer .directory-footer-emergency .text-left p {
  margin: 0;
}

#footer a[href="#top"] {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 0.25rem;
  gap: 0.5rem;
  color: var(--shell-gray-700);
  font-weight: 600;
  margin-top: 0.25rem;
  text-decoration: none;
}

#footer a[href="#top"]:hover {
  color: var(--shell-emerald-700);
}

@media (min-width: 768px) {
  #footer a[href="#top"] {
    margin-top: 0;
  }
}

@media (min-width: 640px) {
  #navigation picture img {
    width: 42px !important;
    height: 42px !important;
  }
}

@media (min-width: 768px) {
  #navigation picture img {
    width: 48px !important;
    height: 48px !important;
  }

  #main-menubar {
    display: flex;
  }

  #desktopNavActions {
    display: flex;
  }

  #mobileMenuToggle {
    display: none !important;
  }

  #search {
    display: none !important;
  }

  #footer .directory-footer-card {
    padding: 2rem;
  }

  #footer .directory-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  #footer .directory-footer-card {
    padding: 3rem;
  }
}

/* ==========================================================================
   Cookie consent (fully handwritten for directory shell routes).
   ========================================================================== */
#cookieConsentBanner {
  background: #1a1a1a;
  bottom: 0;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
  color: #f8f9fa;
  left: 0;
  padding: 0.5rem;
  position: fixed;
  right: 0;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 10001;
}

#cookieConsentBanner.hidden {
  display: none;
}

#cookieConsentBanner:not(.translate-y-full) {
  transform: translateY(0);
}

#cookieConsentBanner > .container {
  margin: 0 auto;
  max-width: 80rem;
}

#cookieConsentBanner > .container > div:first-child {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}

#cookieConsentBanner > .container > div:first-child > span {
  color: #f8f9fa;
  font-size: 0.875rem;
}

#cookieConsentBanner a[href="/cookie-policy"] {
  color: #7dd3fc;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#cookieConsentBanner a[href="/cookie-policy"]:hover {
  color: #fff;
}

#cookieConsentBanner > .container > div:first-child > div:last-child {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
}

#cookieManageBtn {
  align-items: center;
  background: transparent;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  color: #d1d5db;
  cursor: pointer;
  display: none;
  font-size: 0.875rem;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.875rem;
}

#cookieManageBtn:hover {
  border-color: #fff;
  color: #fff;
}

#cookieRejectAllBtn,
#cookieAcceptAllBtn,
#cookieSavePreferencesBtn,
#cookieCancelBtn {
  align-items: center;
  border-radius: 0.375rem;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.8125rem;
  font-weight: 700;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 0.875rem;
}

#cookieRejectAllBtn {
  background: #fff;
  border: 1px solid #1a1a1a;
  color: #1a1a1a;
}

#cookieRejectAllBtn:hover {
  background: #e5e7eb;
}

#cookieAcceptAllBtn,
#cookieSavePreferencesBtn {
  background: #1a5276;
  border: 1px solid #1a5276;
  color: #fff;
}

#cookieAcceptAllBtn:hover,
#cookieSavePreferencesBtn:hover {
  background: #154060;
  border-color: #154060;
}

#cookieCancelBtn {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #d1d5db;
}

#cookieCancelBtn:hover {
  border-color: #fff;
  color: #fff;
}

#cookiePreferences {
  border-top: 1px solid #4b5563;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

#cookiePreferences.hidden {
  display: none;
}

#cookiePreferences fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

#cookiePreferences fieldset > div {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#cookiePreferences fieldset > div > div {
  align-items: center;
  background: #2d2d2d;
  border-radius: 0.375rem;
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
}

#cookiePreferences label {
  color: #d1d5db;
  font-size: 0.875rem;
}

#cookiePreferences input[type="checkbox"] {
  cursor: pointer;
  height: 1rem;
  min-height: 1rem;
  min-width: 1rem;
  width: 1rem;
}

#cookiePreferences .opacity-60 {
  opacity: 0.6;
}

#cookiePreferences > div:last-child {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

/* Keep UI visible on small screens for older users. */
@media (max-width: 639px) {
  #cookieConsentBanner > .container > div:first-child > span:first-child {
    display: none;
  }
}

@media (min-width: 640px) {
  #cookieManageBtn {
    display: inline-flex;
  }

  #cookiePreferences fieldset > div {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #cookieRejectAllBtn,
  #cookieAcceptAllBtn,
  #cookieSavePreferencesBtn,
  #cookieCancelBtn {
    font-size: 0.875rem;
    padding: 0.625rem 1.125rem;
  }
}

/* ==========================================================================
   Location consent modal on area page.
   ========================================================================== */
#locationConsentModal {
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 50;
}

#locationConsentModal.hidden {
  display: none;
}

#locationConsentModal > div {
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  margin: 1rem;
  max-width: 28rem;
  padding: 1.5rem;
  width: calc(100% - 2rem);
}

#locationConsentTitle {
  color: var(--shell-gray-900);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

#locationConsentDesc {
  color: var(--shell-gray-700);
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

#locationConsentModal > div > div {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

#locationConsentDecline,
#locationConsentAccept {
  align-items: center;
  border-radius: 0.5rem;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.875rem;
  font-weight: 600;
  justify-content: center;
  min-height: 48px;
  padding: 0.5rem 1rem;
}

#locationConsentDecline {
  background: #fff;
  border: 1px solid var(--shell-gray-300);
  color: var(--shell-gray-700);
}

#locationConsentDecline:hover {
  background: var(--shell-gray-50);
}

#locationConsentAccept {
  background: #2563eb;
  border: 1px solid #2563eb;
  color: #fff;
}

#locationConsentAccept:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}
