/* App Global & Common Component Styles */
:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --bulma-primary-h: 221deg;
  --bulma-primary-s: 83%;
  --bulma-primary-l: 53%;
  --bulma-primary-invert-l: 100%;
  --bulma-primary-invert: #ffffff;
}

.has-text-primary, a.has-text-primary {
  color: #1d4ed8 !important;
}

.has-text-success {
  color: #15803d !important;
}

.has-text-grey {
  color: #334155 !important;
}

.has-text-grey-light {
  color: #475569 !important;
}

.tag.is-light {
  color: #1e293b !important;
}

.tag.is-success {
  background-color: #dcfce7 !important;
  color: #166534 !important;
  font-weight: 700;
}

.button.is-primary:not(.is-outlined):not(.is-light) {
  color: #ffffff !important;
}

.button.is-primary:not(.is-outlined):not(.is-light) svg,
.button.is-primary:not(.is-outlined):not(.is-light) i,
.button.is-primary:not(.is-outlined):not(.is-light) .icon {
  color: #ffffff !important;
  fill: #ffffff !important;
}

.button.is-primary.is-outlined {
  color: #2563eb !important;
  border-color: #2563eb !important;
}

.button.is-primary.is-outlined:hover {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

form:tool-form-active {
  outline: 2px dashed #2563eb;
  outline-offset: 2px;
}

button:tool-submit-active, input[type="submit"]:tool-submit-active {
  outline: 2px dashed #dc2626;
  outline-offset: 2px;
}

/* Favorites System Button */
.favorite-toggle-btn {
  position: relative;
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  z-index: 5;
  vertical-align: middle;
}

.favorite-toggle-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 44px;
  min-height: 44px;
  width: 100%;
  height: 100%;
}

.favorite-toggle-btn:hover {
  transform: scale(1.1);
  background: rgba(15, 23, 42, 0.85);
}

.favorite-toggle-btn.is-favorited {
  background: #ffffff !important;
  color: #ef4444 !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f8fafc;
  color: #1e293b;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.item-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

.category-scroll {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 8px;
  padding-bottom: 4px;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  text-decoration: none;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.category-pill:hover, .category-pill.is-active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.category-pill .tag {
  background-color: #f1f5f9;
  color: #0f172a;
  font-weight: 600;
  transition: all 0.15s ease;
}

.category-pill:hover .tag, .category-pill.is-active .tag {
  background-color: #1d4ed8;
  color: #ffffff !important;
}

.hero-search-box {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 16px;
  color: #ffffff;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.fa-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
}

.fa-icon.fa-lg { width: 1.25em; height: 1.25em; }
.fa-icon.fa-2x { width: 2em; height: 2em; }
.fa-icon.fa-3x { width: 3em; height: 3em; }

.pswp__img {
  object-fit: contain;
  max-width: none !important;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffffff;
  border: none;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.15s ease;
  opacity: 0.85;
  padding: 0;
}

.slider-arrow:hover {
  background: rgba(15, 23, 42, 0.85);
  transform: translateY(-50%) scale(1.1);
  opacity: 1;
}

.slider-arrow-prev {
  left: 8px;
}

.slider-arrow-next {
  right: 8px;
}

.slider-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  z-index: 5;
  pointer-events: none;
}

.main-image-wrapper img {
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.main-image-wrapper img.is-preview-loading {
  filter: blur(2px);
  opacity: 0.92;
}

.main-gallery-spinner {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}

.main-gallery-spinner .spinner-icon {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: gallery-spin 0.6s linear infinite;
}

@keyframes gallery-spin {
  to { transform: rotate(360deg); }
}

dialog:modal {
  overscroll-behavior: contain;
}

dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.feedback-fab-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 970;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9999px;
  background: #334155;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.feedback-fab-btn:hover {
  background: #1e293b;
  transform: translateY(-2px);
}

.item-sticky-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 980;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.is-justify-content-between {
  justify-content: space-between !important;
}

.feedback-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: 480px;
  width: calc(100vw - 24px);
  margin: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  background: #ffffff;
  color: #1e293b;
}

.feedback-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
}

.feedback-dialog-body {
  padding: 18px 20px;
}

.feedback-screenshot-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}

.feedback-screenshot-preview {
  display: block;
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  object-position: top center;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
}

.feedback-captcha-box {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 14px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.feedback-captcha-box.is-verified {
  background: #f0fdf4;
  border-color: #22c55e;
}

.feedback-captcha-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  .item-detail-info-box {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .feedback-fab-btn {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    font-size: 0.75rem;
  }
  .feedback-fab-label {
    display: inline-block;
  }
  body.has-sticky-bottom-bar .feedback-fab-btn {
    bottom: 64px;
  }
  body.has-sticky-bottom-bar {
    padding-bottom: 56px;
  }
  html, body {
    overflow-x: hidden;
    width: 100%;
  }
  .container {
    max-width: 100vw;
    box-sizing: border-box;
  }
  .columns {
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-inline-start: 0 !important;
    margin-inline-end: 0 !important;
  }
  .button.is-fullwidth {
    white-space: normal !important;
    height: auto !important;
  }
  svg {
    max-width: 100%;
  }
}

/* ==========================================================================
   Dark Mode Support (Activated automatically via html[data-theme="dark"])
   ========================================================================== */

html[data-theme="dark"] {
  --bulma-body-background-color: #0b1120;
  --bulma-body-color: #e2e8f0;
  --bulma-scheme-main: #0f172a;
  --bulma-scheme-main-bis: #1e293b;
  --bulma-scheme-main-ter: #334155;
  --bulma-card-background-color: #1e293b;
  --bulma-box-background-color: #1e293b;
  --bulma-border-weak: #334155;
  --bulma-border: #334155;
  --bulma-text: #e2e8f0;
  --bulma-text-strong: #f8fafc;
  --bulma-text-weak: #94a3b8;
  --bulma-link-text: #60a5fa;

  /* Search hero tokens in dark mode */
  --hs-primary-light: rgba(37, 99, 235, 0.2);
  --hs-card-bg: #1e293b;
  --hs-subtle-bg: #0f172a;
  --hs-input-bg: #0f172a;
  --hs-border: #334155;
  --hs-border-hover: #475569;
  --hs-text-dark: #f8fafc;
  --hs-text-muted: #94a3b8;
}

html[data-theme="dark"] body {
  background-color: #0b1120 !important;
  color: #e2e8f0 !important;
}

/* Navbars & Footers */
.navbar-brand a.navbar-item,
.navbar-brand a.navbar-item:hover,
.navbar-brand a.navbar-item:focus,
.navbar-brand a.navbar-item:active {
  background-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

html[data-theme="dark"] .navbar,
html[data-theme="dark"] .navbar.is-white {
  background-color: #0f172a !important;
  border-bottom: 1px solid #1e293b !important;
}

html[data-theme="dark"] .navbar-brand a.navbar-item {
  color: #f8fafc !important;
}
html[data-theme="dark"] .navbar-brand a.navbar-item:hover,
html[data-theme="dark"] .navbar-brand a.navbar-item:focus,
html[data-theme="dark"] .navbar-brand a.navbar-item:active {
  background-color: transparent !important;
  color: #38bdf8 !important;
}

html[data-theme="dark"] .navbar-item,
html[data-theme="dark"] .navbar-link,
html[data-theme="dark"] a.navbar-item,
html[data-theme="dark"] a.navbar-link {
  color: #e2e8f0 !important;
  background-color: transparent !important;
}

html[data-theme="dark"] a.navbar-item:hover,
html[data-theme="dark"] a.navbar-item:focus,
html[data-theme="dark"] a.navbar-item:active,
html[data-theme="dark"] a.navbar-item.is-active,
html[data-theme="dark"] a.navbar-link:hover,
html[data-theme="dark"] a.navbar-link:focus,
html[data-theme="dark"] a.navbar-link:active {
  background-color: #1e293b !important;
  color: #38bdf8 !important;
}

html[data-theme="dark"] .footer {
  background-color: #0f172a !important;
  color: #94a3b8 !important;
  border-top: 1px solid #1e293b;
}

/* Bento Grid Sections ("Снизили цену", "В добрые руки", etc.) */
html[data-theme="dark"] .bento-box {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .bento-box--drops {
  background: #1e293b !important;
  border-color: #166534 !important;
}

html[data-theme="dark"] .bento-box--pets {
  background: #1e293b !important;
  border-color: #065f46 !important;
}

html[data-theme="dark"] .bento-box--tech {
  background: #1e293b !important;
  border-color: #155e75 !important;
}

html[data-theme="dark"] .bento-box--home {
  background: #1e293b !important;
  border-color: #831843 !important;
}

html[data-theme="dark"] .bento-title {
  color: #f8fafc !important;
}

html[data-theme="dark"] .bento-item-card {
  background-color: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .bento-item-img-box {
  background-color: #0b1120 !important;
}

html[data-theme="dark"] .bento-item-title {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .bento-title-wrap .tag {
  background-color: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #cbd5e1 !important;
}

/* Common Surfaces & Cards */
html[data-theme="dark"] .card,
html[data-theme="dark"] .box,
html[data-theme="dark"] .shelf-card,
html[data-theme="dark"] .deal-card,
html[data-theme="dark"] .re-card,
html[data-theme="dark"] .item-card,
html[data-theme="dark"] .re-tabbed-shelf {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0;
}

html[data-theme="dark"] .shelf-card-title,
html[data-theme="dark"] .shelf-title,
html[data-theme="dark"] .shelf-title-wrap h2,
html[data-theme="dark"] .deal-card-title,
html[data-theme="dark"] .deal-card-title a,
html[data-theme="dark"] .re-card-title a,
html[data-theme="dark"] .item-card .item-title,
html[data-theme="dark"] .shelf-price {
  color: #f8fafc !important;
}

/* Secondary & Muted Typography */
html[data-theme="dark"] .has-text-grey,
html[data-theme="dark"] .shelf-card-meta,
html[data-theme="dark"] .shelf-subtitle,
html[data-theme="dark"] .deal-location-row,
html[data-theme="dark"] .re-card-address,
html[data-theme="dark"] .re-card-specs,
html[data-theme="dark"] .re-card-footer-meta,
html[data-theme="dark"] .deal-specs-row {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .has-text-grey-light,
html[data-theme="dark"] .re-card-footer-time {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .shelf-price .price-unit,
html[data-theme="dark"] .deal-price-current .price-unit {
  color: #cbd5e1 !important;
}

/* Real Estate Shelf Tab Buttons (Готовые до $65k, Аренда до $550, etc.) */
html[data-theme="dark"] .re-shelf-tab-btn {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .re-shelf-tab-btn:hover {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}
html[data-theme="dark"] .re-shelf-tab-btn.is-active {
  background: #2563eb !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35) !important;
}
html[data-theme="dark"] .re-shelf-tab-btn.is-active i {
  color: #ffffff !important;
}

/* Search Mode Tabs (Жильё и аренда vs Вещи и товары) */
html[data-theme="dark"] .search-mode-tabs {
  background: #0f172a !important;
  border-bottom: 1px solid #334155 !important;
}
html[data-theme="dark"] .search-mode-tabs .tab-btn {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .search-mode-tabs .tab-btn.is-active {
  background: #1e293b !important;
  color: #60a5fa !important;
  border-bottom: 2px solid #3b82f6 !important;
}

/* Deal Type Segmented Buttons (Помесячно, Посуточно, Покупка) */
html[data-theme="dark"] .segmented-group {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
}
html[data-theme="dark"] .segmented-group .seg-btn {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .segmented-group .seg-btn:hover {
  color: #f8fafc !important;
}
html[data-theme="dark"] .segmented-group .seg-btn.is-selected {
  background: #334155 !important;
  color: #f8fafc !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

/* Room Buttons (Студия, 1+1, 2+1, 3+1) */
html[data-theme="dark"] .room-chips .room-btn {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .room-chips .room-btn:hover {
  background: #1e293b !important;
  color: #f8fafc !important;
}
html[data-theme="dark"] .room-chips .room-btn.is-selected {
  background: #2563eb !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

/* Price Distinct Input Boxes (Min, Max) */
html[data-theme="dark"] .distinct-price-box {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
}
html[data-theme="dark"] .distinct-price-box .curr-symbol {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .distinct-price-box input {
  color: #f8fafc !important;
}
html[data-theme="dark"] .distinct-price-box input::placeholder {
  color: #64748b !important;
}

/* Map Action Button (На карте) */
html[data-theme="dark"] .btn-on-map {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .btn-on-map:hover {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}

/* Condition Feature Chips (От собственника, У моря, С газом) */
html[data-theme="dark"] .cond-chip {
  background: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .cond-chip:hover {
  background: #1e293b !important;
  color: #f8fafc !important;
}
html[data-theme="dark"] .cond-chip.is-active {
  background: #2563eb !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

/* Field Group Labels (СДЕЛКА, КОМНАТ, ЦЕНА) */
html[data-theme="dark"] .home-search-card .cluster-label,
html[data-theme="dark"] .home-search-card .price-label {
  color: #94a3b8 !important;
}

/* Navbar Buttons & Controls (Батуми, Currency, RU, etc.) */
html[data-theme="dark"] .button.is-light {
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .button.is-light:hover {
  background-color: #334155 !important;
  color: #f8fafc !important;
}
html[data-theme="dark"] .dropdown-menu .dropdown-content {
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}
html[data-theme="dark"] .dropdown-item {
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item.is-active {
  background-color: #334155 !important;
  color: #f8fafc !important;
}

/* Pills, Badges & Separators */
html[data-theme="dark"] .deal-spec-pill {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .deal-inline-sep,
html[data-theme="dark"] .range-sep {
  color: #64748b !important;
}

html[data-theme="dark"] .tag.is-light {
  background-color: #334155 !important;
  color: #f8fafc !important;
}

/* Form Controls & Inputs */
html[data-theme="dark"] .input,
html[data-theme="dark"] .textarea,
html[data-theme="dark"] .select select {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .card-header {
  background-color: #0f172a !important;
  border-bottom: 1px solid #334155 !important;
}

html[data-theme="dark"] .card-header-title {
  color: #f8fafc !important;
}

html[data-theme="dark"] .notification.is-light {
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .notification.is-light strong {
  color: #f8fafc !important;
}

html[data-theme="dark"] .shelf-arrow-btn {
  background: rgba(30, 41, 59, 0.95) !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}
html[data-theme="dark"] .shelf-arrow-btn:hover {
  background: #334155 !important;
}

html[data-theme="dark"] .re-shelf-tab-btn {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .re-shelf-tab-btn:hover {
  background: #334155 !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
}
html[data-theme="dark"] .re-shelf-tab-btn.is-active {
  background: #2563eb !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .shelf-view-all {
  color: #38bdf8 !important;
}
html[data-theme="dark"] .shelf-view-all:hover {
  color: #7dd3fc !important;
}

/* Sticky Bottom Bar Dark Mode */
html[data-theme="dark"] .item-sticky-bottom-bar {
  background: rgba(15, 23, 42, 0.96) !important;
  border-top-color: #334155 !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6) !important;
}

html[data-theme="dark"] .item-sticky-bottom-bar .item-sticky-price .has-text-grey {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .item-sticky-bottom-bar .item-sticky-price .has-text-primary {
  color: #38bdf8 !important;
}

/* Cross-posted channels & duplicate postings box */
html[data-theme="dark"] .item-cross-postings-box {
  background-color: #1e293b !important;
  border: 1px solid #475569 !important;
}

html[data-theme="dark"] .item-cross-postings-box h3,
html[data-theme="dark"] .has-text-warning-dark {
  color: #fbbf24 !important;
}

html[data-theme="dark"] .item-alerts-box {
  background-color: #1e293b !important;
  border: 1px solid #0284c7 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .item-alerts-box strong {
  color: #38bdf8 !important;
}

html[data-theme="dark"] .item-alerts-box p {
  color: #94a3b8 !important;
}

/* Item Show Middle Section Cards in Dark Mode */
html[data-theme="dark"] .item-original-text-box {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] #telegram-post-details {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] #telegram-post-details summary {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] #telegram-post-details summary:hover {
  background-color: #273549 !important;
}

html[data-theme="dark"] #telegram-post-details .p-3 {
  background-color: #0f172a !important;
  border-top-color: #334155 !important;
}

html[data-theme="dark"] #telegram-widget-container {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .item-source-box,
html[data-theme="dark"] .item-seller-card,
html[data-theme="dark"] .item-location-box,
html[data-theme="dark"] .seller-card {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .seller-card .avatar-placeholder {
  background: #0f172a !important;
  color: #38bdf8 !important;
  border: 1px solid #334155 !important;
}

html[data-theme="dark"] .seller-card .seller-view-ads-btn {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #38bdf8 !important;
}

html[data-theme="dark"] .seller-card .seller-view-ads-btn:hover {
  background-color: #334155 !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .seller-card div[style*="border-top"] {
  border-top-color: #334155 !important;
}

html[data-theme="dark"] .favorite-show-btn {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .favorite-show-btn:hover {
  background-color: #334155 !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .button.is-info.is-light {
  background-color: #1e293b !important;
  border-color: #0284c7 !important;
  color: #38bdf8 !important;
}

html[data-theme="dark"] .button.is-info.is-light:hover {
  background-color: #0369a1 !important;
  color: #ffffff !important;
}

/* Property Description & Tabs in Dark Mode */
.property-desc-content {
  color: #334155;
}

html[data-theme="dark"] .property-desc-content,
html[data-theme="dark"] #desc-content-ru,
html[data-theme="dark"] #desc-content-orig,
html[data-theme="dark"] #desc-content-main {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .tabs.is-boxed li a {
  background-color: transparent !important;
  border-color: transparent !important;
  color: #94a3b8 !important;
}

html[data-theme="dark"] .tabs.is-boxed li.is-active a {
  background-color: #334155 !important;
  border-color: #475569 !important;
  border-bottom-color: #334155 !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .tabs.is-boxed ul {
  border-bottom-color: #475569 !important;
}

html[data-theme="dark"] .has-text-link,
html[data-theme="dark"] a.has-text-link {
  color: #38bdf8 !important;
}
html[data-theme="dark"] a.has-text-link:hover {
  color: #7dd3fc !important;
}

html[data-theme="dark"] .table.is-striped tbody tr:not(.is-selected):nth-child(even) {
  background-color: rgba(30, 41, 59, 0.5) !important;
}
html[data-theme="dark"] .table.is-striped tbody tr:not(.is-selected):nth-child(odd) {
  background-color: transparent !important;
}

/* Market Analysis & Reposts in Dark Mode */
html[data-theme="dark"] #other-offers .notification.is-light,
html[data-theme="dark"] #other-offers .property-reposts-container {
  background-color: #0f172a !important;
  border: 1px solid #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] #other-offers .reposts-summary-box {
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] #other-offers .reposts-summary-box .has-text-dark {
  color: #f8fafc !important;
}
html[data-theme="dark"] #other-offers .reposts-summary-box .has-text-grey {
  color: #94a3b8 !important;
}

html[data-theme="dark"] #other-offers tr.repost-current-row td {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] #other-offers table tr[style*="border-top"] {
  border-top-color: #334155 !important;
}

html[data-theme="dark"] #other-offers table td {
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] #other-offers .repost-view-btn {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #38bdf8 !important;
}
html[data-theme="dark"] #other-offers .repost-view-btn:hover {
  background-color: #334155 !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] #other-offers button[data-action*="reposts-list#toggle"] {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #38bdf8 !important;
}

html[data-theme="dark"] .item-possible-matches-box {
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
}

/* Bulma typography helper overrides for Dark Mode */
html[data-theme="dark"] .has-text-dark,
html[data-theme="dark"] a.has-text-dark {
  color: #f8fafc !important;
}
html[data-theme="dark"] a.has-text-dark:hover {
  color: #38bdf8 !important;
}

html[data-theme="dark"] .has-text-primary,
html[data-theme="dark"] a.has-text-primary {
  color: #38bdf8 !important;
}
html[data-theme="dark"] a.has-text-primary:hover {
  color: #7dd3fc !important;
}

html[data-theme="dark"] .has-text-grey-light {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .item-card {
  background-color: #1e293b !important;
  border: 1px solid #334155 !important;
}

html[data-theme="dark"] .item-card figure.image {
  background-color: #0b1120 !important;
}

html[data-theme="dark"] .has-text-grey-dark {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .has-text-grey {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .has-text-info-dark {
  color: #38bdf8 !important;
}

html[data-theme="dark"] .has-text-info {
  color: #38bdf8 !important;
}

html[data-theme="dark"] a.author-link,
html[data-theme="dark"] .author-link {
  color: #cbd5e1 !important;
  text-decoration: underline;
  text-decoration-color: #475569;
}
html[data-theme="dark"] a.author-link:hover,
html[data-theme="dark"] .author-link:hover {
  color: #38bdf8 !important;
  text-decoration-color: #38bdf8;
}

/* Tables in Dark Mode */
html[data-theme="dark"] .table {
  background-color: transparent !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .table tfoot th,
html[data-theme="dark"] .table th {
  color: #94a3b8 !important;
  border-bottom: 1px solid #334155 !important;
}

html[data-theme="dark"] .table td {
  border-top: 1px solid #334155 !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .table tr.has-background-white td,
html[data-theme="dark"] .table tr.has-background-white {
  background-color: #283548 !important;
}

html[data-theme="dark"] .table tr:hover td {
  background-color: rgba(51, 65, 85, 0.4) !important;
}

html[data-theme="dark"] .tag.is-warning.is-light {
  background-color: #78350f !important;
  color: #fde68a !important;
  border: 1px solid #b45309 !important;
}

/* Card Media Placeholders (Properties, Classifieds, Deals, Shelves) in Dark Mode */
html[data-theme="dark"] .re-card .re-card-media,
html[data-theme="dark"] .deal-card-media,
html[data-theme="dark"] .deal-card-placeholder,
html[data-theme="dark"] .shelf-card-img-box,
html[data-theme="dark"] .item-card figure.image {
  background-color: #090d16 !important;
  color: #64748b !important;
}

html[data-theme="dark"] .re-card .re-card-placeholder,
html[data-theme="dark"] .deal-card-placeholder,
html[data-theme="dark"] .shelf-card-placeholder,
html[data-theme="dark"] .item-card .item-card-placeholder {
  background-color: rgba(0, 0, 0, 0.45) !important;
  color: #64748b !important;
}

html[data-theme="dark"] .re-card .re-card-placeholder i,
html[data-theme="dark"] .deal-card-placeholder-icon,
html[data-theme="dark"] .shelf-card-placeholder i,
html[data-theme="dark"] .shelf-card-placeholder svg,
html[data-theme="dark"] .item-card-placeholder i {
  color: #475569 !important;
  opacity: 0.6;
}

html[data-theme="dark"] .re-card .re-card-placeholder span,
html[data-theme="dark"] .deal-card-placeholder-text,
html[data-theme="dark"] .item-card-placeholder span {
  color: #64748b !important;
  opacity: 0.75;
}

html[data-theme="dark"] .re-card.is-viewed {
  background: #1e293b !important;
  opacity: 0.75;
}

html[data-theme="dark"] .re-card.is-viewed .re-card-title a {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .re-card-price {
  color: #38bdf8 !important;
}

