/*
Theme Name: Sheshi Slate Color System
Version: 0.26.0
Description: Terminal Schieferblau palette and legacy color cleanup.
*/

/* Stable dark aliases for intentionally dark Slate islands in either theme. */
:root {
  --dark-surface-page: #10171b;
  --dark-surface-card: #172126;
  --dark-surface-sunken: #1d2a30;
  --dark-text-primary: #f7f9fa;
  --dark-text-secondary: #bcc6cb;
  --dark-text-muted: #96a5ac;
  --dark-border: #2b3a41;
  --dark-border-strong: #455861;
  --dark-accent-text: #9cbac8;
}

/* Keep all public surfaces on the semantic token layer. */
html,
body.sheshi-shell,
body.sheshi-home,
.sheshi-page,
.sheshi-profile-page,
.sheshi-results-page,
.sheshi-directory-page {
  color: var(--text-primary) !important;
  background-color: var(--surface-page) !important;
}

/* Large page surfaces must follow the active theme, never legacy charcoal. */
body.sheshi-shell .sheshi-directory-hero > .sheshi-wrap,
body.sheshi-shell .sheshi-directory-next,
body.sheshi-shell .sheshi-results-page > .sheshi-wrap,
body.sheshi-shell .sheshi-page article,
body.sheshi-shell .sheshi-organization-page,
body.sheshi-shell .sheshi-travel-hero > .sheshi-wrap,
body.error404.sheshi-shell .sheshi-not-found-layout {
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
  background: var(--surface-card) !important;
}

body.sheshi-shell .sheshi-directory-section-dark,
body.sheshi-shell .sheshi-form-section,
body.error404.sheshi-shell .sheshi-search-not-found {
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
  background: var(--surface-sunken) !important;
}

body.sheshi-shell .sheshi-travel-page,
body.sheshi-shell .sheshi-travel-hero,
body.sheshi-shell .sheshi-travel-section,
body.error404.sheshi-shell .sheshi-not-found {
  color: var(--text-primary) !important;
  background: var(--surface-page) !important;
}

body.sheshi-shell .sheshi-directory-hero .sheshi-search-directory,
body.error404.sheshi-shell .sheshi-search-not-found {
  border-color: var(--border-strong) !important;
  background: var(--surface-card) !important;
}

body.sheshi-shell .sheshi-directory-hero .sheshi-search-directory input,
body.sheshi-shell .sheshi-directory-hero .sheshi-search-directory select,
body.error404.sheshi-shell .sheshi-search-not-found input,
body.error404.sheshi-shell .sheshi-search-not-found select {
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
  background: var(--surface-sunken) !important;
}

body.sheshi-shell .sheshi-offer-card {
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
  background: var(--surface-card) !important;
}

::selection {
  color: var(--text-primary);
  background: var(--accent-bg);
}

/* One Slate family for every functional accent. */
.sheshi-portal .sheshi-eyebrow,
.sheshi-nav-cta svg,
.sheshi-mobile-action svg,
.sheshi-text-link,
.sheshi-directory-link,
.sheshi-cta-link,
.sheshi-result-website,
.sheshi-transparency-links a,
.sheshi-profile-contact a,
.sheshi-profile-state > a,
.sheshi-profile-breadcrumbs a,
.sheshi-results-breadcrumb a,
.sheshi-filter-reset,
.entry-content a {
  color: var(--accent-text) !important;
}

body.sheshi-shell .sheshi-directory-link,
body.sheshi-home .sheshi-directory-link,
body.sheshi-shell .sheshi-directory-link *,
body.sheshi-home .sheshi-directory-link *,
body.sheshi-shell .sheshi-cta-link,
body.sheshi-home .sheshi-cta-link,
body.sheshi-shell .sheshi-cta-link *,
body.sheshi-home .sheshi-cta-link *,
body.sheshi-shell .sheshi-result-website *,
body.sheshi-home .sheshi-result-website * {
  color: var(--accent-text) !important;
}

.sheshi-search-submit,
.sheshi-button,
.sheshi-beta-form button[type="submit"],
.sheshi-profile-primary-link--cta,
.sheshi-profile-mobile-primary,
.sheshi-profile-mobile-callbar a {
  border-color: var(--accent) !important;
  color: #fff !important;
  background: var(--accent) !important;
}

.sheshi-search-submit:hover,
.sheshi-button:hover,
.sheshi-beta-form button[type="submit"]:hover,
.sheshi-profile-primary-link--cta:hover,
.sheshi-profile-mobile-primary:hover,
.sheshi-profile-mobile-callbar a:hover {
  border-color: var(--accent-hover) !important;
  color: #fff !important;
  background: var(--accent-hover) !important;
}

.sheshi-search-submit:active,
.sheshi-button:active,
.sheshi-beta-form button[type="submit"]:active,
.sheshi-profile-primary-link--cta:active,
.sheshi-profile-mobile-primary:active,
.sheshi-profile-mobile-callbar a:active {
  border-color: var(--accent-active) !important;
  background: var(--accent-active) !important;
}

/* Category, map and directory icons never carry category-specific colors. */
.sheshi-category-icon,
.sheshi-result-card--search > .sheshi-category-icon,
.sheshi-index-row .sheshi-category-icon,
.sheshi-directory-index > a .sheshi-category-icon {
  color: var(--accent-text) !important;
  background: var(--accent-bg) !important;
}

.sheshi-category-icon svg,
.sheshi-category-icon use,
.sheshi-phone-icon,
.sheshi-search-submit-icon,
.sheshi-map-dot {
  color: currentColor;
  fill: none;
  stroke: currentColor;
}

.sheshi-map-dot { fill: var(--accent) !important; }

/* Retire the old dark magazine strip and warm-number treatments on home/travel. */
body.sheshi-home .sheshi-portal,
body.sheshi-home .sheshi-front-panel,
body.sheshi-home .sheshi-travel-feature-copy,
body.sheshi-home .sheshi-travel-proof,
body.sheshi-shell .sheshi-travel-feature-copy,
body.sheshi-shell .sheshi-travel-proof {
  color: var(--text-primary) !important;
}

body.sheshi-home .sheshi-travel-feature-layout,
body.sheshi-shell .sheshi-travel-feature-layout {
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
  background: transparent !important;
}

body.sheshi-home .sheshi-travel-proof,
body.sheshi-shell .sheshi-travel-proof,
body.sheshi-home .sheshi-travel-proof > div,
body.sheshi-shell .sheshi-travel-proof > div {
  border-color: var(--border) !important;
  background: var(--surface-card) !important;
}

body.sheshi-home .sheshi-offer-number,
body.sheshi-shell .sheshi-offer-number {
  border-color: var(--border) !important;
  color: var(--accent-text) !important;
  background: var(--accent-bg) !important;
}

body.sheshi-home .sheshi-discovery,
body.sheshi-shell .sheshi-discovery,
body.sheshi-home .sheshi-trust-item,
body.sheshi-shell .sheshi-trust-item {
  border-color: var(--dark-border) !important;
  color: var(--dark-text-primary) !important;
  background: var(--dark-surface-card) !important;
}

body.sheshi-home .sheshi-discovery {
  border-color: var(--dark-border) !important;
  color: var(--dark-text-primary) !important;
  background: var(--dark-surface-page) !important;
}

body.sheshi-home .sheshi-discovery h2 {
  color: var(--dark-text-primary) !important;
}

body.sheshi-home .sheshi-discovery .sheshi-directory-link,
body.sheshi-home .sheshi-discovery .sheshi-directory-link * {
  color: var(--dark-accent-text) !important;
}

body.sheshi-home .sheshi-directory-link,
body.sheshi-shell .sheshi-directory-link,
body.sheshi-home .sheshi-cta-link,
body.sheshi-shell .sheshi-cta-link {
  border-color: var(--border-strong) !important;
}

/* Old magazine selectors must not leak warm gray or coral into result and info modules. */
body.sheshi-shell .sheshi-result-title-name,
body.sheshi-home .sheshi-result-title-name {
  color: var(--text-primary) !important;
}

body.sheshi-shell .sheshi-discovery-suggest,
body.sheshi-shell .sheshi-discovery-suggest span,
body.sheshi-home .sheshi-discovery-suggest,
body.sheshi-home .sheshi-discovery-suggest span {
  color: var(--text-secondary) !important;
}

body.sheshi-shell .sheshi-trust-item strong,
body.sheshi-home .sheshi-trust-item strong {
  color: var(--dark-text-primary) !important;
}

body.sheshi-shell .sheshi-offer-card > a span,
body.sheshi-shell .sheshi-offer-action a span,
body.sheshi-home .sheshi-offer-card > a span,
body.sheshi-home .sheshi-offer-action a span {
  color: var(--accent-text) !important;
}

body.sheshi-shell .sheshi-map-card-head span {
  color: var(--dark-accent-text) !important;
}

body.sheshi-shell .sheshi-map-card-head strong {
  color: var(--dark-text-primary) !important;
}

body.sheshi-shell .sheshi-map-foot,
body.sheshi-shell .sheshi-map-foot span,
body.sheshi-shell .sheshi-map-foot i {
  color: var(--dark-text-secondary) !important;
}

body.sheshi-shell .sheshi-map-card-head,
body.sheshi-shell .sheshi-map-foot,
body.sheshi-shell .sheshi-dach-map {
  border-color: var(--dark-border) !important;
  color: var(--dark-text-secondary) !important;
  background: var(--dark-surface-card) !important;
}

body.sheshi-shell .sheshi-map-countries a,
body.sheshi-shell .sheshi-map-countries text,
body.sheshi-shell .sheshi-map-markers text {
  color: var(--dark-text-secondary) !important;
  fill: var(--dark-text-secondary) !important;
}

body.sheshi-shell .sheshi-map-countries path {
  fill: var(--dark-surface-sunken) !important;
  stroke: var(--dark-border-strong) !important;
}

body.sheshi-shell .sheshi-map-leader {
  color: var(--dark-text-muted) !important;
  stroke: var(--dark-text-muted) !important;
}

body.sheshi-shell .sheshi-map-markers a,
body.sheshi-shell .sheshi-map-hit {
  color: var(--dark-text-secondary) !important;
}

body.sheshi-shell .sheshi-map-dot {
  color: var(--dark-accent-text) !important;
  fill: var(--accent) !important;
  stroke: var(--dark-text-primary) !important;
}

body.sheshi-shell .sheshi-location-list a,
body.sheshi-shell .sheshi-location-list a span {
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
}

body.single-listing .sheshi-profile-contact > div,
body.single-listing .sheshi-profile-contact dl > div {
  border-color: var(--border) !important;
}

body.single-listing .sheshi-profile-contact dl {
  border-color: var(--border) !important;
}

body.single-listing .sheshi-profile-contact > div:not(:last-of-type) {
  border-bottom-color: var(--border) !important;
}

body.single-listing .sheshi-profile-phone-link {
  border-color: var(--border-strong) !important;
  color: var(--text-primary) !important;
  background: transparent !important;
}

body.single-listing .sheshi-profile-phone-link span {
  border: 0 !important;
  color: inherit !important;
}

body.single-listing .sheshi-profile-identity,
body.single-listing .sheshi-profile-meta-line,
body.single-listing .sheshi-profile-section,
body.single-listing .sheshi-transparency-links,
body.single-listing .sheshi-transparency-links a {
  border-color: var(--border) !important;
}

body.single-listing .sheshi-profile-socials,
body.single-listing .sheshi-profile-socials > span {
  border-color: var(--border) !important;
  color: var(--text-muted) !important;
}

body.single-listing .sheshi-profile-breadcrumbs span {
  color: var(--text-muted) !important;
}

body.single-listing .sheshi-profile-contact a span,
body.single-listing .sheshi-profile-socials a span {
  color: var(--accent-text) !important;
}

body.sheshi-shell .sheshi-travel-page,
body.sheshi-shell .sheshi-travel-hero,
body.sheshi-shell .sheshi-travel-section,
body.sheshi-shell .sheshi-travel-heading,
body.sheshi-shell .sheshi-travel-route-list,
body.sheshi-shell .sheshi-travel-provider-grid,
body.sheshi-shell .sheshi-travel-provider-index,
body.sheshi-shell .sheshi-travel-page .sheshi-wrap {
  color: var(--text-primary) !important;
}

body.sheshi-shell .sheshi-travel-provider-grid a {
  color: var(--accent-text) !important;
}

body.sheshi-shell .sheshi-travel-dark {
  color: var(--dark-text-primary) !important;
  background: var(--dark-surface-page) !important;
}

body.sheshi-shell .sheshi-travel-route-list > a,
body.sheshi-shell .sheshi-travel-provider-grid > article,
body.sheshi-shell .sheshi-travel-provider-index > a {
  border-color: var(--dark-border) !important;
  color: var(--dark-text-primary) !important;
  background: var(--dark-surface-card) !important;
}

body.sheshi-shell .sheshi-travel-route-list > a div,
body.sheshi-shell .sheshi-travel-route-list > a strong,
body.sheshi-shell .sheshi-travel-provider-grid > article,
body.sheshi-shell .sheshi-travel-provider-grid > article strong,
body.sheshi-shell .sheshi-travel-provider-index > a,
body.sheshi-shell .sheshi-travel-provider-index > a strong {
  color: var(--dark-text-primary) !important;
}

body.sheshi-shell .sheshi-map-card {
  border-color: var(--dark-border) !important;
  color: var(--dark-text-primary) !important;
  background: var(--dark-surface-card) !important;
}

body.sheshi-shell .sheshi-travel-transparency,
body.sheshi-shell .sheshi-travel-transparency > div,
body.sheshi-shell .sheshi-travel-transparency strong {
  border-color: var(--dark-border) !important;
  color: var(--dark-text-secondary) !important;
  background: var(--dark-surface-sunken) !important;
}

body.sheshi-shell .sheshi-page article,
body.sheshi-shell .sheshi-organization-page,
body.error404.sheshi-shell .sheshi-not-found,
body.error404.sheshi-shell .sheshi-not-found-layout,
body.error404.sheshi-shell .sheshi-search-not-found,
body.error404.sheshi-shell .sheshi-not-found-actions {
  color: var(--text-primary) !important;
}

body.sheshi-home .sheshi-hero-tools,
body.sheshi-shell .sheshi-results-toolbar,
body.sheshi-shell .sheshi-sort-form {
  color: var(--text-muted) !important;
}

body.search.sheshi-shell .sheshi-facet-option,
body.search.sheshi-shell .sheshi-facet-option span,
body.search.sheshi-shell .sheshi-facet-box {
  color: var(--text-secondary) !important;
}

body.search.sheshi-shell .sheshi-results-breadcrumb,
body.search.sheshi-shell .sheshi-results-breadcrumb span {
  color: var(--text-muted) !important;
}

.sheshi-menu-toggle-icon,
.sheshi-menu-toggle-icon span {
  color: var(--text-primary) !important;
}

.sheshi-menu-toggle-icon span {
  background: var(--text-primary) !important;
}

body.sheshi-shell .sheshi-form-section label,
body.sheshi-shell .sheshi-form-consent {
  color: var(--text-secondary) !important;
}

/* Selected filters and official status use the same family, not green. */
.sheshi-meta-chip--status-official,
.sheshi-facet-option.is-active .sheshi-facet-box,
.sheshi-filter-chip.is-active,
.sheshi-quick-categories a[aria-current="page"] {
  border-color: var(--sheshi-status-official-border) !important;
  color: var(--verified) !important;
  background: var(--verified-bg) !important;
}

.sheshi-facet-option.is-active .sheshi-facet-box {
  box-shadow: inset 0 0 0 3px var(--verified-bg) !important;
}

.sheshi-meta-chip--status-editorial,
.sheshi-meta-chip--status-demo {
  color: var(--text-muted) !important;
  background: var(--surface-sunken) !important;
}

/* Success and error messages stay structural and never introduce new hues. */
.sheshi-form-status,
.sheshi-form-success,
.sheshi-form-error,
.sheshi-note,
.sheshi-beta-notice,
.sheshi-beta-banner {
  border: 1px solid var(--border-strong) !important;
  border-left: 3px solid var(--accent) !important;
  color: var(--text-primary) !important;
  background: var(--surface-sunken) !important;
  box-shadow: none !important;
}

.sheshi-form-status strong,
.sheshi-form-success strong,
.sheshi-form-error strong {
  color: var(--text-primary) !important;
}

/* Secondary actions remain neutral; only the primary task is filled. */
.sheshi-result-details,
.sheshi-profile-phone-link,
.sheshi-profile-phone-copy,
.sheshi-profile-management a,
.sheshi-nav-cta,
.sheshi-mobile-action,
.sheshi-theme-toggle {
  border-color: var(--border-strong) !important;
  color: var(--text-primary) !important;
  background: transparent !important;
}

.sheshi-result-details:hover,
.sheshi-profile-phone-link:hover,
.sheshi-profile-phone-copy:hover,
.sheshi-profile-management a:hover,
.sheshi-nav-cta:hover,
.sheshi-mobile-action:hover,
.sheshi-theme-toggle:hover {
  border-color: var(--accent) !important;
  color: var(--text-primary) !important;
  background: var(--surface-sunken) !important;
}

/* Travel and informational pills share the neutral/status system. */
.sheshi-travel-status span,
.sheshi-travel-route-list em,
.sheshi-travel-label,
.sheshi-travel-provider-index span,
.sheshi-service-index li {
  border-color: var(--border) !important;
  color: var(--text-secondary) !important;
  background: var(--surface-sunken) !important;
}

/* Footer and overlays must not fall back to legacy charcoal or warm gray. */
.sheshi-site-footer,
.sheshi-mobile-menu nav,
.sheshi-nav-panel,
.sheshi-profile-mobile-callbar {
  border-color: var(--border) !important;
  color: var(--text-primary) !important;
  background: var(--surface-card) !important;
}

/* Explicit dark-mode CTA keeps readable white on the stable brand core. */
html[data-theme="dark"] .sheshi-search-submit,
html[data-theme="dark"] .sheshi-button,
html[data-theme="dark"] .sheshi-beta-form button[type="submit"],
html[data-theme="dark"] .sheshi-profile-primary-link--cta,
html[data-theme="dark"] .sheshi-profile-mobile-primary,
html[data-theme="dark"] .sheshi-profile-mobile-callbar a {
  color: #fff !important;
}

@media (forced-colors: active) {
  .sheshi-category-icon,
  .sheshi-form-status,
  .sheshi-form-success,
  .sheshi-form-error {
    border: 1px solid CanvasText !important;
  }
}
