:root {
  --primary-blue: #2B659F;
  --accent-gold: #E5C158;
  --text-dark: #333333;
  --bg-light: #F4F7F6;
  --white: #FFFFFF;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Open Sans", sans-serif; 
}

body {
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header styling matching main site */
header {
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 1.5rem 2rem;
  border-bottom: 5px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  position: relative;
  z-index: 100;
}

header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-logo a {
  text-decoration: unset;
  color: unset;
  border-radius: 4px;
}

.brand-logo a:focus-visible {
  outline: 3px solid var(--accent-gold) !important;
  outline-offset: 3px !important;
}

.brand-icon-img a {
  display: inline-flex;
  border-radius: 50%;
}

.brand-icon-img a:focus-visible {
  outline: 3px solid var(--accent-gold) !important;
  outline-offset: 3px !important;
}

.brand-icon-img img, .mapicon {
  max-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background-color: var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--primary-blue);
  font-size: 1.2rem;
}

/* Skip link for keyboard bypass blocks (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent-gold);
  color: var(--primary-blue);
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 0 0 8px 8px;
  z-index: 10000;
  text-decoration: none;
  transition: top 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--white);
  outline-offset: 2px;
}

/* Global Focus Visible System (WCAG 2.4.7) */
:focus-visible {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
}

header :focus-visible, 
footer :focus-visible, 
.map-header :focus-visible, 
.map-footer :focus-visible {
  outline: 3px solid var(--accent-gold);
  outline-offset: 2px;
}

.header-shortcuts {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: transparent;
  border: 1.5px solid var(--accent-gold);
  border-radius: 20px;
  color: var(--white);
  min-height: 34px;
  height: auto;
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.1s;
  white-space: nowrap;
  box-sizing: border-box;
  line-height: 1.2;
}

button.header-btn {
  font-family: inherit;
  line-height: 1.2;
  margin: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.header-btn:hover {
  background-color: var(--white);
  color: var(--primary-blue);
  transform: translateY(-1px);
}

/* Help split button styles */
.help-split-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--accent-gold);
  border-radius: 20px;
  min-height: 34px;
  height: auto;
  box-sizing: border-box;
  background-color: transparent;
  transition: transform 0.1s;
}

.help-split-btn:hover {
  transform: translateY(-1px);
}

.help-split-left-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: transparent;
  border: none;
  border-radius: 18px 0 0 18px;
  color: var(--white);
  min-height: 34px;
  height: 100%;
  padding: 6px 10px 6px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  box-sizing: border-box;
  line-height: 1.2;
}

.help-split-left-btn:hover {
  background-color: var(--white);
  color: var(--primary-blue);
}

.help-split-left-btn:focus,
.help-split-left-btn:focus-visible {
  background-color: var(--white);
  color: var(--primary-blue);
  outline: 2.5px solid var(--accent-gold) !important;
  outline-offset: 2px !important;
}

.help-split-btn::after {
  content: "";
  display: block;
  width: 0px;
  height: 60%;
  background-color: rgba(229, 193, 88, 0.4);
}

.help-split-right-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: none;
  border-radius: 0 18px 18px 0;
  color: var(--white);
  min-height: 34px;
  height: 100%;
  padding: 6px 10px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
  box-sizing: border-box;
}

.help-split-right-btn:hover {
  background-color: var(--white);
  color: var(--primary-blue);
}

.help-split-right-btn:focus,
.help-split-right-btn:focus-visible {
  background-color: var(--white);
  color: var(--primary-blue);
  outline: 2.5px solid var(--accent-gold) !important;
  outline-offset: 2px !important;
}

/* Dropdown menu */
.help-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background-color: var(--primary-blue);
  border: 1.5px solid var(--accent-gold);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  display: none;
  min-width: 180px;
  padding: 0;
  overflow: hidden;
}

.help-dropdown-menu.show {
  display: block;
}

/* Dropdown items */
.help-dropdown-item {
  width: 100%;
  background-color: transparent;
  border: none;
  color: var(--white);
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  transition: background-color 0.2s, color 0.2s;
  white-space: nowrap;
  text-decoration: none;
  box-sizing: border-box;
}

.help-dropdown-item:not(:last-child) {
  border-bottom: 1.5px solid rgba(229, 193, 88, 0.3);
}

.help-dropdown-item:hover,
.help-dropdown-item:focus,
.help-dropdown-item:focus-visible {
  background-color: var(--accent-gold);
  color: var(--primary-blue);
  outline: none;
}
a.help-link{
color: var(--primary-blue);
}

.help-tour-list li {
line-height: 1;
margin-bottom: 15px;
}

/* Footer styling matching header */
footer {
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 1.5rem 2rem;
  border-top: 5px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: auto;
}

.footer-copyright {
  font-size: 0.9rem;
  opacity: 0.9;
  color: var(--white);
  margin: 0;
  flex-grow: 1;
  text-align: center;
}

.footer-version-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 3px;
  font-weight: inherit;
  font-size: inherit;
  margin: 0 4px;
  border-radius: 2px;
  transition: text-decoration-color 0.2s ease, opacity 0.2s ease;
}

.footer-version-link:hover {
  text-decoration-color: var(--white);
  opacity: 1;
}

.footer-version-link:focus-visible {
  outline: 2px solid var(--accent-gold) !important;
  outline-offset: 3px !important;
  text-decoration-color: var(--white);
  opacity: 1;
}

.footer-shortcuts {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* Main Layout & Common Content Container */
main {
  flex-grow: 1;
  padding: 12px 6px;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

.intro-section {
  text-align: center;
  margin-bottom: 3rem;
}

.intro-section h2 {
  font-size: 2.2rem;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

.intro-section p {
  font-size: 1.1rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto;
}

/* Credits subpage specific styles */
.credits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.credit-card {
  background: var(--white);
  border-radius: 8px;
  padding: 1.75rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  border-top: 4px solid var(--primary-blue);
  transition: transform 0.2s, box-shadow 0.2s;
}

.credit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.credit-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.credit-card .card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-blue);
  margin: 0;
}

.credit-card .card-badge {
  font-size: 0.75rem;
  font-weight: bold;
  background: rgba(43, 101, 159, 0.1);
  color: var(--primary-blue);
  padding: 3px 8px;
  border-radius: 4px;
}

.credit-card .card-description {
  font-size: 0.92rem;
  color: #555;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.credit-card .card-footer {
  display: flex;
  gap: 10px;
  border-top: 1px solid #f0f0f0;
  padding-top: 1rem;
  margin-top: auto;
}

.credit-card .card-link {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--primary-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.credit-card .card-link:hover {
  color: var(--accent-gold);
}

/* Privacy & TOS subpage specific styles to avoid card/text collisions */
.privacy-container {
  max-width: 900px !important;
}

.privacy-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-left: 5px solid var(--primary-blue);
  margin-bottom: 2.5rem;
}

.privacy-card h2 {
  color: var(--primary-blue);
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #eee;
  padding-bottom: 0.5rem;
}

.privacy-card h3 {
  color: var(--primary-blue);
  font-size: 1.3rem;
  margin: 1.5rem 0 0.75rem 0;
}

.privacy-card p {
  margin-bottom: 1rem;
  color: #4a4a4a;
}

.privacy-card ul {
  margin: 1rem 0 1.5rem 1.5rem;
  color: #4a4a4a;
}

.privacy-card li {
  margin-bottom: 0.5rem;
}

.privacy-card .note-box {
  background-color: rgba(43, 101, 159, 0.05);
  border-left: 4px solid var(--primary-blue);
  padding: 1.25rem;
  border-radius: 4px;
  margin: 1.5rem 0;
}

.privacy-card .note-box p:last-child {
  margin-bottom: 0;
}

/* Responsive Overrides */
@media (max-width: 900px) {
  .credits-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1024px) {
  .container:not(.privacy-container) {
    max-width: 1800px;
    padding: 0 1rem;
  }
}

@media (max-width: 768px) {
  header {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.4rem 0.6rem;
    gap: 8px;
  }

  .brand-logo {
    width: 100%;
    justify-content: flex-start;
    padding-right: 75px;
  }

  .brand-logo h1 {
    font-size: 1.15rem;
  }

  .brand-icon-img img, .mapicon {
    max-width: 28px;
    height: 28px;
  }

  .help-split-btn {
    position: absolute;
    right: 8px;
    top: 6px;
    margin: 0;
    height: 28px;
  }

  .help-split-left-btn {
    font-size: 0.82rem;
    padding: 0 6px 0 10px;
  }

  .help-split-right-btn {
    padding: 0 6px;
  }

  .header-shortcuts {
    justify-content: center;
    width: 100%;
    gap: 8px;
  }

  .header-shortcuts .header-btn {
    font-size: 0.82rem;
    height: 28px;
    padding: 0 8px;
  }

  footer {
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 0.6rem;
    gap: 10px;
  }

  footer .brand-logo {
    padding-right: 0;
    justify-content: center;
  }

  footer .footer-copyright {
    font-size: 0.8rem;
    text-align: center;
    width: 100%;
    margin: 2px 0;
  }

  .footer-shortcuts {
    display: flex;
    justify-content: center;
    width: 100%;
    gap: 8px;
    flex-wrap: wrap;
  }

  .footer-shortcuts .header-btn {
    font-size: 0.82rem;
    height: 28px;
    padding: 0 8px;
  }
}

/* Custom WV Sort Webcomponent styles */
wv-sort {
  display: block;
  flex: 1;
  min-width: 250px;
}

.wv-sort-option:hover {
  background-color: var(--wv-hover-bg, #f7f1eb) !important;
}

/* ==========================================
   Unified Modal & Dialog Design System
   ========================================== */
.wv-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.45); /* Modern, slightly darker slate overlay */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.wv-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.wv-modal-card {
  background: var(--white);
  border-radius: 16px;
  max-width: 540px;
  width: 90%;
  max-height: 85vh;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  position: relative;
  transform: scale(0.92);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wv-modal-overlay.active .wv-modal-card {
  transform: scale(1);
}

.wv-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem 1rem 1.75rem;
  border-bottom: 1px solid #e2e8f0;
  min-height: 56px;
  box-sizing: border-box;
}

.wv-modal-title {
  color: var(--primary-blue);
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
  margin-right: 12px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.wv-modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s, background-color 0.2s;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.wv-modal-close:hover {
  color: var(--text-dark);
  background-color: #f1f5f9;
}

.wv-modal-body {
  padding: 1.5rem 1.75rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
  flex-grow: 1;
}

.wv-modal-body::-webkit-scrollbar {
  width: 6px;
}

.wv-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.wv-modal-body::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}

.wv-modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  box-sizing: border-box;
}

/* Option C: Responsive Layouts (Site Help expands to full-screen, Print Modal stays centered) */
@media (max-width: 768px) {
  .wv-modal-overlay.full-screen-mobile .wv-modal-card {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
    padding: 0;
    transform: none !important;
  }
  .wv-modal-overlay.full-screen-mobile .wv-modal-header {
    padding: 1rem;
    min-height: 48px;
  }
  .wv-modal-overlay.full-screen-mobile .wv-modal-body {
    padding: 1rem;
    max-height: calc(100vh - 180px);
  }
  .wv-modal-overlay.full-screen-mobile .wv-modal-footer {
    padding: 1rem;
  }
}

/* Small Viewport Optimization (iPhone SE) */
@media (max-width: 375px) {
  .wv-modal-title {
    font-size: 1.1rem;
    margin-right: 8px;
    gap: 6px;
  }
  .wv-modal-title img {
    width: 20px !important;
    height: 20px !important;
  }
  .wv-modal-close {
    font-size: 1.5rem;
    width: 28px;
    height: 28px;
  }
}

/* Help-specific content styling inside modal */
.help-popover-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.help-popover-list li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  text-align: left;
}

.help-section-item {
  scroll-margin-top: 24px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

@keyframes highlight-pulse-animation {
  0% {
    background-color: rgba(229, 193, 88, 0.25);
    box-shadow: 0 0 12px rgba(229, 193, 88, 0.4);
    border-radius: 8px;
  }
  70% {
    background-color: rgba(229, 193, 88, 0.1);
    box-shadow: 0 0 6px rgba(229, 193, 88, 0.15);
  }
  100% {
    background-color: transparent;
    box-shadow: none;
  }
}

.highlight-pulse {
  animation: highlight-pulse-animation 2s ease-out;
  padding: 6px;
  margin: -6px;
}

.help-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.help-popover-icon {
  background: #f0f4f8;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.help-popover-list li strong {
  color: var(--text-dark);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0;
}

.help-item-desc {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  padding-left: 0;
  text-align: left;
}

.help-popover-action-btn {
  width: 100%;
  margin: 0;
  padding: 12px;
  cursor: pointer;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  background-color: var(--primary-blue);
  color: var(--white);
  font-weight: bold;
  font-size: 1rem;
  transition: background-color 0.2s ease;
}

.help-popover-action-btn:hover {
  background-color: #1d4ed8;
}

/* ==========================================
   Help Footer Button & Mobile Stack Enhancements
   ========================================== */
.help-footer-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--white, #ffffff);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
  color: var(--text-dark, #334155);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.help-footer-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: var(--primary-blue, #1e3a8a);
}

.help-footer-btn img {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
}

/* Print/Save PDF Button Group Layout */
.wv-modal-print-group {
  display: flex;
  gap: 12px;
  width: 100%;
}

.wv-modal-print-group .btn-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Rounded corners and unified font styling for all bottom controls in modals and popovers */
.wv-modal-footer .btn-main,
.wv-modal-footer .btn-secondary,
.wv-modal-footer .help-footer-btn,
.wv-modal-footer .help-popover-action-btn,
.help-popover-footer-links .btn-main,
.help-popover-footer-links .btn-secondary,
.help-popover-footer-links .help-footer-btn,
.help-popover-footer-links .help-popover-action-btn {
  border-radius: 10px !important;
  font-size: 1.1rem !important;
  font-weight: bold !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

/* Selectively lighten weight of Credits and Privacy & TOS links inside the help dialog */
.help-popover-footer-links .help-footer-btn {
  font-weight: 600 !important;
}

/* Mobile responsive stacking for Print Options */
@media (max-width: 480px) {
  .wv-modal-print-group {
    flex-direction: column !important;
    gap: 8px !important;
  }
}

/* ==========================================================================
   Share & QR Code Modal Styles
   ========================================================================== */
.share-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}

.share-qr-hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  width: 100%;
  max-width: 280px;
  box-sizing: border-box;
}

.share-qr-hero-card:hover,
.share-qr-hero-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 77, 124, 0.14);
  border-color: var(--primary-blue, #1a4d7c);
  outline: none;
}

.share-qr-hero-card:active {
  transform: scale(0.98);
}

.share-qr-canvas-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-qr-canvas-wrapper canvas,
.share-qr-canvas-wrapper img {
  width: 100% !important;
  height: auto !important;
  max-width: 256px;
  display: block;
  border-radius: 6px;
}

.share-qr-hint {
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 5px;
}

.share-meta-card {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  box-sizing: border-box;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.share-meta-card:hover,
.share-meta-card:focus-visible {
  background-color: #f1f5f9;
  border-color: var(--primary-blue, #1a4d7c);
  outline: none;
}

.share-meta-card:active {
  transform: scale(0.99);
}

.share-meta-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-blue, #1a4d7c);
  margin-bottom: 4px;
  word-break: break-word;
}

.share-meta-url {
  font-size: 0.82rem;
  color: #475569;
  word-break: break-all;
  line-height: 1.35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.share-meta-hint {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.share-modal-action-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

.share-modal-action-row .btn-main {
  flex: 1;
}

@media (max-width: 480px), (max-height: 700px) {
  #share-modal .wv-modal-card {
    max-height: 92vh;
    width: 94%;
  }

  .share-modal-body {
    padding: 0.75rem 1rem !important;
    gap: 8px;
  }

  .share-qr-hero-card {
    max-width: min(220px, 58vw);
    padding: 8px;
    border-radius: 10px;
  }

  .share-qr-canvas-wrapper canvas,
  .share-qr-canvas-wrapper img {
    max-width: 204px;
  }

  .share-qr-hint {
    margin-top: 4px;
    font-size: 0.72rem;
  }

  .share-meta-card {
    padding: 8px 10px;
    border-radius: 10px;
  }

  .share-meta-title {
    font-size: 0.92rem;
    margin-bottom: 2px;
  }

  .share-meta-url {
    font-size: 0.75rem;
  }

  .share-meta-hint {
    margin-top: 3px;
    font-size: 0.68rem;
  }

  .share-modal-action-row {
    flex-direction: column;
    gap: 8px;
  }

  .share-modal-action-row button {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}

.share-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px);
  z-index: 100000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Touch hit target optimization for map header tag close buttons */
.tag-close-btn,
.tour-close-btn {
  padding: 6px 8px !important;
  margin: -4px -4px -4px 2px !important;
  cursor: pointer !important;
  touch-action: manipulation;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: none !important;
  background: transparent !important;
  border-radius: 4px;
}

.tag-close-btn:hover,
.tour-close-btn:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

/* Shared Custom Multi-Select Dropdown & Controls */
.directory-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.directory-search {
  flex: 1;
  min-width: 200px;
  padding: 12px;
  border: 1.5px solid #8c8c8c;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  background-color: var(--white);
}

.custom-multiselect {
  position: relative;
  min-width: 200px;
  user-select: none;
  flex: 1;
}

.multiselect-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1.5px solid #8c8c8c;
  border-radius: 4px;
  background-color: var(--white);
  cursor: pointer;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.custom-multiselect.active .multiselect-trigger {
  border-color: var(--primary-blue);
}

.trigger-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.trigger-arrow {
  font-size: 0.8rem;
  color: #4a4a4a;
  transition: transform 0.2s;
}

.custom-multiselect.active .trigger-arrow {
  transform: rotate(180deg);
}

.multiselect-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--white);
  border: 1.5px solid #8c8c8c;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  max-height: 280px;
  overflow-y: auto;
  padding: 8px 0;
}

.custom-multiselect.active .multiselect-dropdown {
  display: block;
}

.multiselect-group-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: bold;
  color: #4a4a4a;
  padding: 8px 16px 4px 16px;
  letter-spacing: 0.5px;
}

.multiselect-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background-color 0.1s;
}

.multiselect-option:hover,
.multiselect-option:focus-within {
  background-color: #f1f5f9;
}

.multiselect-option.active {
  background-color: #f0f4f8;
  font-weight: 600;
}

.multiselect-option input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  accent-color: var(--primary-blue);
}

.multiselect-option input[type="checkbox"]:focus-visible {
  outline: 2.5px solid var(--primary-blue) !important;
  outline-offset: 2px !important;
}

.multiselect-option-label {
  flex-grow: 1;
  cursor: pointer;
}

/* Print Stylesheet for Portal Pages */
@media print {
  site-header,
  site-footer,
  .site-header,
  .site-footer,
  #explore-dropdown,
  #share-dropdown,
  .help-btn,
  .no-print {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  main {
    padding: 0 !important;
    margin: 0 !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }
}



