/* CausalFunnel Dark Theme Global Overrides */

/* Override WordPress default styles */
body,
html {
  background: #0f1523 !important;
  color: #e2e8f0 !important;
}

/* Force all containers and wrappers to have dark background */
#wpcontent,
.wp-admin #wpcontent,
#wpwrap {
  background: #0f1523 !important;
}

/* Override any default admin panel styling */
.wp-admin .causalfunnel-container,
.wp-admin .causalfunnel-customer-journey,
.wp-admin .causalfunnel-heatmap {
  background: #0f1523 !important;
}

/* Remove any white background from parent containers */
.causalfunnel-container > *,
.causalfunnel-customer-journey > *,
.causalfunnel-heatmap > * {
  background-color: transparent !important;
}

/* Fix form elements */
input,
select,
textarea,
button {
  background: #0f1523 !important;
  color: #e2e8f0 !important;
  border: 1px solid #2d3748 !important;
}

input::placeholder,
textarea::placeholder {
  color: #64748b !important;
}

select option {
  background: #1a2332 !important;
  color: #e2e8f0 !important;
}

/* Links */
a {
  color: #818cf8 !important;
}

a:hover {
  color: #a5b4fc !important;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #e2e8f0 !important;
}

/* Tables */
table,
thead,
tbody,
tr,
td,
th {
  background-color: transparent !important;
  border-color: #2d3748 !important;
  color: #e2e8f0 !important;
}

/* Buttons */
.button,
button,
input[type="button"],
input[type="submit"] {
  background: #818cf8 !important;
  color: white !important;
  border: none !important;
  cursor: pointer;
}

.button:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  background: #6366f1 !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1a2332;
}

::-webkit-scrollbar-thumb {
  background: #2d3748;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3d4a5c;
}

/* Firefox scrollbar */
* {
  scrollbar-color: #2d3748 #1a2332;
  scrollbar-width: thin;
}

/* Remove any visible white space or flash */
.cf-simple-message {
  background: #1a2332 !important;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-left: 4px solid #ef4444;
  color: #fca5a5;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.cf-simple-message h3 {
  color: #ef4444;
  margin: 0 0 10px 0;
}

.cf-simple-message p {
  color: #fca5a5;
  margin: 0 0 10px 0;
}

.cf-simple-message strong {
  color: #818cf8;
}

/* Ensure visibility on all screens */
@media (max-width: 768px) {
  body,
  html {
    background: #0f1523 !important;
  }

  .causalfunnel-container,
  .causalfunnel-customer-journey,
  .causalfunnel-heatmap {
    padding: 16px !important;
    max-width: 100% !important;
  }
}

/* Loading indicator */
.causalfunnel-loading {
  background: #0f1523 !important;
  border: 2px solid #818cf8;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  color: #94a3b8;
}

/* No print styles */
@media print {
  body,
  html {
    background: white;
    color: black;
  }
}

/* ── No-data / gathering state ───────────────────────────────── */
.cf-no-data-container {
  background: #1a2332;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-left: 4px solid #818cf8;
  border-radius: 10px;
  padding: 40px 36px;
  margin: 24px 0;
  text-align: center;
}

.cf-no-data-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.7;
}

.cf-no-data-container h3 {
  margin: 0 0 12px 0;
  font-size: 1.35rem;
  font-weight: 600;
  color: #818cf8;
}

.cf-no-data-primary {
  font-size: 1rem;
  color: #cbd5e1;
  margin: 0 0 14px 0;
  line-height: 1.6;
}

.cf-no-data-support,
.cf-no-data-explore {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0 0 10px 0;
}

.cf-no-data-link {
  color: #818cf8;
  text-decoration: none;
  font-weight: 500;
}

.cf-no-data-link:hover {
  color: #a5b4fc;
  text-decoration: underline;
}

.cf-no-data-debug {
  margin-top: 18px;
  font-size: 0.75rem;
  color: #475569;
}
