/* --- UI Themes --- */

/* 1. Palette 1 - Catppuccin (Mocha Dark) */
:root[data-theme="catppuccin"] {
  --bg-color: #11111b;
  --panel-bg: rgba(24, 24, 37, 0.65);
  --panel-bg-solid: #181825;
  --text-color: #cdd6f4;
  --text-muted: #a6adc8;
  --accent-color: #89b4fa;
  --accent-hover: #b4befe;
  --border-color: rgba(255, 255, 255, 0.08);
  --input-bg: rgba(49, 50, 68, 0.5);
  --input-border: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.3);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 92%;
  --transition-speed: 0.2s;
  --squircle-lg: 18px;
  --squircle-md: 12px;
  --squircle-sm: 8px;
}

/* 2. Palette 1 - Catppuccin (Latte Light) */
:root[data-theme="catppuccin"][data-active-mode="light"] {
  --bg-color: #eff1f5;
  --panel-bg: rgba(230, 233, 239, 0.65);
  --panel-bg-solid: #e6e9ef;
  --text-color: #4c4f69;
  --text-muted: #6c6f85;
  --accent-color: #1e66f5;
  --accent-hover: #7287fd;
  --border-color: rgba(0, 0, 0, 0.06);
  --input-bg: rgba(204, 208, 218, 0.5);
  --input-border: rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* 3. Palette 2 - Cupertino (Night Dark) */
:root, :root[data-theme="cupertino"] {
  --bg-color: #0e0f12;
  --panel-bg: rgba(28, 28, 30, 0.65);
  --panel-bg-solid: #1c1c1e;
  --text-color: #f5f5f7;
  --text-muted: #8e8e93;
  --accent-color: #0a84ff;
  --accent-hover: #359aff;
  --border-color: rgba(255, 255, 255, 0.08);
  --input-bg: rgba(44, 44, 46, 0.5);
  --input-border: rgba(255, 255, 255, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.3);
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 92%;
  --transition-speed: 0.2s;
  --squircle-lg: 18px;
  --squircle-md: 12px;
  --squircle-sm: 8px;
}
 
/* 4. Palette 2 - Cupertino (Day Light) */
:root[data-active-mode="light"],
:root[data-theme="cupertino"][data-active-mode="light"] {
  --bg-color: #f5f5f7;
  --panel-bg: rgba(255, 255, 255, 0.65);
  --panel-bg-solid: #fafafa; /* avoid pure white #fff */
  --text-color: #1c1c1e;
  --text-muted: #8e8e93;
  --accent-color: #007aff;
  --accent-hover: #0063cc;
  --border-color: rgba(0, 0, 0, 0.06);
  --input-bg: rgba(230, 230, 235, 0.5);
  --input-border: rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* 5. Palette 3 - Zeit (Edge Dark) */
:root[data-theme="zeit"] {
  --bg-color: #0a0a0c;
  --panel-bg: rgba(18, 18, 20, 0.65);
  --panel-bg-solid: #121214;
  --text-color: #f5f5f7;
  --text-muted: #88888b;
  --accent-color: #0070f3; /* Zeit Accent */
  --accent-hover: #3291ff;
  --border-color: rgba(255, 255, 255, 0.08);
  --input-bg: rgba(24, 24, 28, 0.5);
  --input-border: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 92%;
  --transition-speed: 0.2s;
  --squircle-lg: 8px; /* Sharp corners characteristic of Zeit design */
  --squircle-md: 6px;
  --squircle-sm: 4px;
}

/* 6. Palette 3 - Zeit (Zeit Light) */
:root[data-theme="zeit"][data-active-mode="light"] {
  --bg-color: #fafafa;
  --panel-bg: rgba(255, 255, 255, 0.65);
  --panel-bg-solid: #f4f4f5;
  --text-color: #111111;
  --text-muted: #666668;
  --accent-color: #0070f3;
  --accent-hover: #0056b3;
  --border-color: rgba(0, 0, 0, 0.08);
  --input-bg: rgba(230, 230, 235, 0.5);
  --input-border: rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.14);
}

/* --- Global Reset & Scrollbars --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Custom minimal scrollbar mimicking macOS overlay scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.47;
  letter-spacing: -0.011em;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* --- Utilities --- */
.hidden {
  display: none !important;
}

/* --- Layout --- */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

header {
  text-align: center;
  margin-bottom: 1.5rem;
}

header h1 {
  font-size: 3.25rem;
  font-weight: 700;
  letter-spacing: -0.022em;
  margin-bottom: 0.35rem;
  color: var(--text-color);
}

.subtitle {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.search-section {
  width: 100%;
  max-width: 720px;
  margin: 0 auto 1.5rem;
}

#search-form {
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--panel-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--squircle-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-speed) ease;
  padding: 0 1.25rem;
}

.search-input-wrapper:focus-within {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-md);
  background-color: var(--panel-bg-solid);
}

.search-compass-icon-btn {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: -0.45rem;
  margin-right: 0.5rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-speed), background-color var(--transition-speed), transform var(--transition-speed);
}

.search-compass-icon-btn:hover {
  color: var(--accent-color);
  background-color: var(--input-bg);
}

.search-compass-icon-btn:active {
  transform: scale(0.92);
}

.search-compass-icon-btn:focus-visible {
  color: var(--accent-color);
  outline: 2px solid var(--accent-color);
  outline-offset: -2px;
}

.search-input-wrapper:focus-within .search-compass-icon-btn {
  color: var(--accent-color);
}

#search-input {
  width: 100%;
  height: 54px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.1rem;
  color: var(--text-color);
  font-weight: 400;
  letter-spacing: -0.015em;
}

#search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.375;
}



/* --- Controls Section --- */
.controls-section {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

select {
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--panel-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: var(--squircle-md);
  padding: 0.5rem 2.25rem 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.85rem;
  transition: all var(--transition-speed);
}

select:hover {
  background-color: var(--input-bg);
}

select:focus {
  border-color: var(--accent-color);
}


/* --- Popover Overlay (Cupertino Sheet Modal) --- */
.popover-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  z-index: 1000;
}

.popover-overlay.hidden {
  display: none !important;
}

.popover-overlay:not(.hidden) {
  display: flex;
  animation: fadeIn 0.2s ease forwards;
}

.popover-overlay:not(.hidden) .popover-panel {
  animation: slideInSheet 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.popover-panel {
  background-color: var(--panel-bg-solid);
  border: 1px solid var(--border-color);
  border-radius: var(--squircle-lg);
  width: 95%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 0.5rem;
}

.popover-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.popover-close-btn {
  background: transparent;
  border: none;
  outline: none;
  color: var(--accent-color);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: opacity var(--transition-speed);
}

.popover-close-btn:hover {
  opacity: 0.8;
}

.popover-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0 1.25rem 1rem;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.4;
}

#popover-search-input {
  width: 100%;
  height: 48px;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 0 1.25rem;
  font-size: 1rem;
  outline: none;
}

#popover-search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.compass-list {
  list-style: none;
  max-height: 280px;
  overflow-y: auto;
  padding: 0.25rem 0;
}

.compass-list li {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-speed);
}

.compass-list li:last-child {
  border-bottom: none;
}

.compass-list li:hover {
  background-color: var(--input-bg);
}

.compass-trigger {
  font-weight: 600;
  font-family: SFMono-Regular, Consolas, monospace;
  color: var(--accent-color);
  background-color: var(--input-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  font-size: 0.8rem;
}

.compass-prefix {
  opacity: 0.5;
}

.compass-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.compass-desc {
  font-weight: 500;
  color: var(--text-color);
}

.compass-domain {
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  background-color: var(--input-bg);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

/* --- Integration Settings Group --- */
.integration-section {
  width: 100%;
  background-color: var(--panel-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--squircle-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.integration-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-color);
}

.integration-section p {
  font-size: 0.9rem;
  color: var(--text-color);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.url-copy-container {
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
}

#integration-url-input {
  flex: 1;
  height: 42px;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--squircle-md);
  color: var(--text-color);
  padding: 0 1rem;
  font-family: SFMono-Regular, Consolas, monospace;
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-speed);
}

#integration-url-input:focus {
  border-color: var(--accent-color);
}

.copy-btn {
  width: 42px;
  height: 42px;
  background-color: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--squircle-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.copy-btn:hover {
  background-color: var(--input-bg);
}

.copy-btn:active {
  opacity: 0.8;
}

.copy-btn img {
  width: 16px;
  height: 16px;
  filter: brightness(0.8);
}

.setup-details {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  margin-top: 1rem;
}

.setup-details summary {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-color);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  -webkit-user-select: none;
  user-select: none;
  outline: none;
}

.setup-details summary::-webkit-details-marker {
  display: none;
}

.setup-details summary::before {
  content: "▸";
  display: inline-block;
  transition: transform var(--transition-speed) ease;
  font-size: 0.85rem;
}

.setup-details[open] summary::before {
  transform: rotate(90deg);
}

.setup-details ol {
  padding-left: 1.1rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.setup-details li {
  margin-bottom: 0.6rem;
  line-height: 1.47;
}

.setup-details li strong {
  color: var(--text-color);
}

/* --- Noscript Fallback --- */
.noscript-container {
  text-align: center;
  padding: 4rem 1.5rem;
}

.noscript-container h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

/* --- Footer --- */
footer {
  text-align: center;
  padding: 1.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  width: 100%;
  opacity: 0.5;
  transition: opacity var(--transition-speed);
}

footer:hover {
  opacity: 1;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-speed);
}

footer a:hover {
  color: var(--accent-color);
}

/* --- Cupertino Sheet/Popover Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInSheet {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* --- Responsive Adjustments --- */
@media (max-width: 480px) {
  main {
    padding: 2.5rem 1rem;
  }
  header h1 {
    font-size: 2.5rem;
  }
  .controls-section {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }
  .controls-left {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .control-group {
    justify-content: space-between;
  }
  .control-group select {
    flex: 1;
    max-width: 180px;
  }

  .popover-overlay {
    padding-top: 5vh;
  }
}

/* --- Attribution Page --- */
.attribution-header {
  width: 100%;
  margin-bottom: 2.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.back-btn {
  align-self: flex-start;
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity var(--transition-speed);
  margin-bottom: 0.5rem;
}

.back-btn:hover {
  opacity: 0.8;
}

.attribution-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.project-author {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.project-author a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
}

.project-author a:hover {
  color: var(--accent-color);
}

.faq-list {
  list-style: none;
  padding-left: 0;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.faq-list li {
  margin-bottom: 0.75rem;
  line-height: 1.47;
}

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

.project-repo {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.project-repo a {
  color: var(--accent-color);
  text-decoration: none;
}

.project-repo a:hover {
  text-decoration: underline;
}

.license-block {
  margin-top: 1rem;
  padding: 1rem;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--squircle-md);
  font-family: SFMono-Regular, Consolas, monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  overflow-x: auto;
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
  text-align: left;
}

/* --- Header Controls (Settings Trigger) --- */
.header-controls {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 100;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--squircle-md);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.375;
  transition: opacity var(--transition-speed), background-color var(--transition-speed), color var(--transition-speed), transform var(--transition-speed);
}

.icon-btn:hover {
  background-color: var(--input-bg);
  color: var(--text-color);
  opacity: 1;
}

.icon-btn:active {
  transform: scale(0.92);
}

/* --- Settings Panel Layout --- */
.settings-body {
  padding: 1rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.settings-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-item label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.settings-item select {
  width: 100%;
  padding-right: 2.25rem; /* keep room for arrow */
}



.compass-container {
  max-width: 100%;
  gap: 1rem;
}

.explorer-filters .search-input-wrapper {
  flex: 1;
}

/* --- Table Filter controls --- */
.explorer-filters {
  display: flex;
  width: 100%;
  gap: 1rem;
  margin-bottom: 1rem;
}

.filter-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.filter-select-wrapper select {
  padding: 0 2.25rem 0 1rem;
  height: 52px;
  background-color: var(--panel-bg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--input-border);
  border-radius: var(--squircle-lg);
  color: var(--text-color);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 0.85rem;
  transition: all var(--transition-speed);
}

.filter-select-wrapper select:hover {
  background-color: var(--border-color);
}

.filter-select-wrapper select:focus {
  border-color: var(--accent-color);
}

/* --- Compass Explorer Table --- */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--squircle-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  background-color: var(--panel-bg-solid);
}

.compass-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.compass-table th,
.compass-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.compass-table th {
  background-color: var(--input-bg);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  -webkit-user-select: none;
  user-select: none;
}

.compass-table th:nth-child(1) { width: 15%; }
.compass-table th:nth-child(2) { width: 15%; }
.compass-table th:nth-child(3) { width: 40%; }
.compass-table th:nth-child(4) { width: 30%; }

.compass-table tbody tr {
  cursor: pointer;
  transition: background-color var(--transition-speed);
}

.compass-table tbody tr:hover {
  background-color: var(--input-bg);
}

.compass-table tbody tr:last-child td {
  border-bottom: none;
}

.compass-table td.table-empty-cell {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.table-trigger-cell {
  font-weight: 600;
  font-family: SFMono-Regular, Consolas, monospace;
  color: var(--accent-color);
}

.table-trigger-cell:hover {
  text-decoration: underline;
}

.table-service-cell {
  font-weight: 500;
  color: var(--text-color);
}

.table-domain-cell {
  color: var(--text-muted);
}

#route-search {
  width: 100%;
  height: 52px;
  background-color: transparent;
  border: none;
  color: var(--text-color);
  font-size: 1rem;
  outline: none;
}

/* Toast notification */
#toast {
  visibility: hidden;
  min-width: 250px;
  background-color: var(--panel-bg-solid);
  border: 1px solid var(--accent-color);
  color: var(--text-color);
  text-align: center;
  border-radius: var(--squircle-md);
  padding: 0.75rem 1.25rem;
  position: fixed;
  z-index: 2000;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%) translateY(20px);
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  box-shadow: var(--shadow-lg);
}

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

/* --- Search Input Clear Button --- */
.search-clear-btn {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-right: 0.25rem;
  transition: color var(--transition-speed), background-color var(--transition-speed), transform var(--transition-speed);
}

.search-clear-btn:hover {
  color: var(--text-color);
  background-color: var(--input-bg);
}

.search-clear-btn:active {
  transform: scale(0.92);
}

.search-clear-btn:focus-visible {
  color: var(--text-color);
  outline: 2px solid var(--accent-color);
  outline-offset: -2px;
}

/* --- Search Input Submit Button --- */
.search-submit-btn {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: -0.45rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-speed), background-color var(--transition-speed), transform var(--transition-speed);
}

.search-submit-btn:hover {
  color: var(--accent-color);
  background-color: var(--input-bg);
}

.search-submit-btn:active {
  transform: scale(0.92);
}

.search-submit-btn:focus-visible {
  color: var(--accent-color);
  outline: 2px solid var(--accent-color);
  outline-offset: -2px;
}

/* --- Compass Page Responsive Styles --- */
@media (max-width: 640px) {
  .explorer-filters {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .filter-select-wrapper,
  .filter-select-wrapper select {
    width: 100%;
  }

  .compass-table {
    min-width: 580px;
  }

  .compass-table th,
  .compass-table td {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
  }
}
