/* Global flat theme: remove gradients and enforce solid, high-contrast surfaces. */

:root {
  --flat-surface: #ffffff;
  --flat-surface-soft: #f5f7fb;
  --flat-border: #d4dfef;
  --flat-text: #0f172a;
  --flat-muted: #5b6679;
}

body.ra-modern {
  --flat-primary: var(--bar-left-color, var(--ra-brand-primary, #1f5ca8));
  --flat-secondary: var(--bar-right-color, var(--ra-brand-secondary, #27afc9));
  --flat-accent: var(--hover-color, var(--ra-brand-accent, #ff6f00));
  --flat-primary-strong: color-mix(in srgb, var(--flat-primary) 78%, #0b1f3a 22%);
  --flat-primary-hover: color-mix(in srgb, var(--flat-primary) 62%, #0b1f3a 38%);
  --flat-secondary-strong: color-mix(in srgb, var(--flat-secondary) 72%, #0c2f2a 28%);
  --flat-secondary-hover: color-mix(in srgb, var(--flat-secondary) 58%, #0c2f2a 42%);
  --flat-text: var(--ra-body-text, #0f172a);
  --flat-muted: var(--ra-muted-text, #5b6679);
  background-image: none !important;
  background-color: var(--flat-surface-soft) !important;
  color: var(--ra-body-text, var(--flat-text));
}

body.ra-modern.dash-workspace {
  --flat-surface: #ffffff;
  --flat-surface-soft: color-mix(in srgb, var(--flat-primary) 8%, #ffffff);
  --flat-border: color-mix(in srgb, var(--flat-primary) 20%, #ffffff);
  --flat-text: var(--body-text-color, #0f172a);
  --flat-muted: var(--ra-muted-text, color-mix(in srgb, var(--body-text-color, #0f172a) 56%, #ffffff));
  --flat-primary-strong: color-mix(in srgb, var(--flat-primary) 84%, #170f14 16%);
  --flat-primary-hover: color-mix(in srgb, var(--flat-primary) 68%, #170f14 32%);
  --flat-secondary-strong: color-mix(in srgb, var(--flat-secondary) 78%, #0f1917 22%);
  --flat-secondary-hover: color-mix(in srgb, var(--flat-secondary) 62%, #0f1917 38%);
  background-color: var(--flat-surface-soft) !important;
}

#site-header .topbar__icon:hover,
#site-header .topbar__icon:focus-visible {
  background: var(--flat-accent) !important;
  border-color: var(--flat-accent) !important;
  box-shadow: none !important;
}

.home-shell,
.ra-carousel-shell,
.listing-shell,
.detail-shell,
.dash-shell,
.dash-panelbar__inner,
.dash-mini-topbar__inner,
.dash-wallet-pack-card,
.dash-modal__dialog,
.dai-panel,
.pai-gallery-panel,
.pai-editor-panel,
main.container,
.container.py-4,
.container.mt-5,
.container.my-5,
.container.text-center {
  background: var(--flat-surface) !important;
  background-image: none !important;
  border-color: var(--flat-border) !important;
  backdrop-filter: none !important;
}

.hero-caption {
  background: color-mix(in srgb, var(--flat-primary) 88%, #0b1220 12%) !important;
  background-image: none !important;
  box-shadow: none !important;
}

.ra-property-placeholder,
.detail-gallery-empty,
.dash-style-preview,
.dash-live-preview {
  background-image: none !important;
  background-color: var(--flat-surface) !important;
}

.detail-gallery-overlay {
  background: transparent !important;
  background-image: none !important;
}

.ra-media-gradient {
  background: linear-gradient(180deg, transparent 78%, rgba(8, 24, 48, 0.12) 100%) !important;
}

body.ra-modern .home-title,
body.ra-modern .home-section-title,
body.ra-modern .team3d-heading h2,
body.ra-modern .ra-carousel-title,
body.ra-modern .listing-title,
body.ra-modern .listing-card-title,
body.ra-modern .listing-filters h2,
body.ra-modern .detail-title,
body.ra-modern .detail-section-head h2,
body.ra-modern .detail-description h2,
body.ra-modern .detail-agent h2,
body.ra-modern .page-title {
  color: var(--ra-heading-text, var(--flat-text)) !important;
}

body.ra-modern .home-kicker,
body.ra-modern .home-subtitle,
body.ra-modern .team3d-heading p,
body.ra-modern .ra-carousel-kicker,
body.ra-modern .listing-kicker,
body.ra-modern .listing-subtitle,
body.ra-modern .listing-field label,
body.ra-modern .listing-empty,
body.ra-modern .detail-kicker,
body.ra-modern .detail-address,
body.ra-modern .detail-code,
body.ra-modern .detail-meta-label,
body.ra-modern .detail-agent-role,
body.ra-modern .ra-card-price .uf,
body.ra-modern .ra-spec-text,
body.ra-modern .ra-property-placeholder {
  color: var(--ra-muted-text, var(--flat-muted)) !important;
}

body.ra-modern .ra-card-title,
body.ra-modern .listing-card-title,
body.ra-modern .listing-card-address,
body.ra-modern .listing-card-specs,
body.ra-modern .detail-description,
body.ra-modern .detail-meta-item,
body.ra-modern .detail-agent-name,
body.ra-modern .ra-spec-chip,
body.ra-modern .ra-spec-value {
  color: var(--ra-card-text, var(--ra-body-text, var(--flat-text))) !important;
}

body.ra-modern .ra-card-price,
body.ra-modern .listing-card-price,
body.ra-modern .detail-price,
body.ra-modern .detail-agent-link,
body.ra-modern .ra-carousel-dot.is-active,
body.ra-modern .text-primary {
  color: var(--ra-price-text, var(--flat-primary)) !important;
}

body.ra-modern .text-muted,
body.ra-modern .details,
body.ra-modern .placeholder {
  color: var(--ra-muted-text, var(--flat-muted)) !important;
}

body.ra-modern .card,
body.ra-modern .card-body,
body.ra-modern .card-title {
  color: var(--ra-card-text, var(--ra-body-text, var(--flat-text))) !important;
}

.site-footer {
  background: var(--flat-primary) !important;
  background-image: none !important;
  color: var(--ra-footer-text, var(--footer-text, #ffffff)) !important;
}

.site-footer__logo-frame {
  background: #ffffff !important;
  background-image: none !important;
  border-color: rgba(255, 255, 255, 0.72) !important;
  box-shadow: none !important;
}

.site-footer__logo {
  background: #ffffff !important;
  box-shadow: none !important;
}

.dash-panelnav a.is-active,
.dash-btn--primary,
.listing-btn--primary,
.detail-btn--primary,
.ra-view-link,
.contact-btn,
.dash-live-menu a.is-cta,
.dash-live-btn {
  background: var(--flat-primary-strong) !important;
  background-image: none !important;
  border-color: var(--flat-primary-strong) !important;
  color: var(--ra-button-text, #ffffff) !important;
}

.dash-panelnav a.is-active:hover,
.dash-btn--primary:hover,
.dash-btn--primary:focus-visible,
.listing-btn--primary:hover,
.listing-btn--primary:focus-visible,
.detail-btn--primary:hover,
.detail-btn--primary:focus-visible,
.ra-view-link:hover,
.ra-view-link:focus-visible,
.contact-btn:hover,
.contact-btn:focus-visible,
.dash-live-menu a.is-cta:hover,
.dash-live-menu a.is-cta:focus-visible,
.dash-live-btn:hover,
.dash-live-btn:focus-visible {
  background: var(--flat-primary-hover) !important;
  border-color: var(--flat-primary-hover) !important;
  color: var(--ra-button-text, #ffffff) !important;
}

.dash-btn--danger {
  background: #b42341 !important;
  background-image: none !important;
  border-color: #b42341 !important;
  color: var(--ra-button-text, #ffffff) !important;
}

.dash-btn--wallet,
.dash-wallet-pill {
  background: var(--flat-secondary-strong) !important;
  background-image: none !important;
  border-color: var(--flat-secondary-strong) !important;
  color: var(--ra-button-text, #ffffff) !important;
  box-shadow: none !important;
}

.dash-btn--wallet:hover,
.dash-btn--wallet:focus-visible {
  background: var(--flat-secondary-hover) !important;
  border-color: var(--flat-secondary-hover) !important;
  color: var(--ra-button-text, #ffffff) !important;
}

body.ra-modern [style*="linear-gradient"],
body.ra-modern [style*="radial-gradient"] {
  background-image: none !important;
}

.dash-wallet-pill span,
.dash-wallet-pill strong {
  color: var(--ra-button-text, #ffffff) !important;
}

.dash-live-topbar,
.dash-live-hero,
.dash-live-footer {
  background: var(--pv-primary, var(--flat-primary)) !important;
  background-image: none !important;
}

.dash-live-hero,
.dash-live-footer {
  border-color: var(--pv-button-border, var(--flat-primary)) !important;
}

.dash-text-editor-head {
  background: var(--flat-primary) !important;
  background-image: none !important;
  border-color: var(--flat-primary) !important;
  box-shadow: none !important;
}

.dash-text-tip-card {
  background: var(--flat-surface) !important;
  background-image: none !important;
}

.dash-palette-card__bar {
  background: var(--pal-left) !important;
}


/* WhatsApp actions are intentionally fixed to the official green brand color. */
.contact-btn,
.contact-btn:visited,
.contact-btn:hover,
.contact-btn:focus-visible,
.detail-btn--primary[href*="wa.me"],
.detail-btn--primary[href*="whatsapp"],
.detail-btn--primary[href*="api.whatsapp.com"] {
  background: #25D366 !important;
  background-image: none !important;
  border-color: #25D366 !important;
  color: #ffffff !important;
  box-shadow: 0 14px 26px rgba(37, 211, 102, 0.28) !important;
}

.contact-btn:hover,
.contact-btn:focus-visible,
.detail-btn--primary[href*="wa.me"]:hover,
.detail-btn--primary[href*="wa.me"]:focus-visible,
.detail-btn--primary[href*="whatsapp"]:hover,
.detail-btn--primary[href*="whatsapp"]:focus-visible,
.detail-btn--primary[href*="api.whatsapp.com"]:hover,
.detail-btn--primary[href*="api.whatsapp.com"]:focus-visible {
  background: #1EBE5D !important;
  border-color: #1EBE5D !important;
  color: #ffffff !important;
  filter: none !important;
}
