/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Theme variables — dark default, light via [data-theme="light"] */
:root {
  --bg-page: #0f172a;
  --bg-card: #020617;
  --bg-card-hover: #1e293b;
  --bg-header: rgba(15, 23, 42, 0.8);
  --bg-header-border: #1e293b;
  --bg-footer: #020617;
  --bg-footer-border: #0f172a;
  --bg-section-alt: transparent;
  --text-heading: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-nav: #94a3b8;
  --text-nav-hover: #f8fafc;
  --border-default: #1e293b;
  --border-card: #0f172a;
  --border-light: #334155;
  --btn-secondary-bg: #1e293b;
  --btn-secondary-border: #334155;
  --btn-secondary-text: #e2e8f0;
  --btn-secondary-hover-bg: #334155;
  --btn-secondary-hover-border: #475569;
  --divider-bg: rgba(51, 65, 85, 0.6);
  --bg-input: #0f172a;
  --border-input: #334155;
  --text-input: #f1f5f9;
  --text-placeholder: #64748b;
}

[data-theme="light"] {
  --bg-page: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f9fafb;
  --bg-header: rgba(255, 255, 255, 0.85);
  --bg-header-border: #e5e7eb;
  --bg-footer: #f9fafb;
  --bg-footer-border: #e5e7eb;
  --bg-section-alt: #f9fafb;
  --text-heading: #111827;
  --text-body: #374151;
  --text-muted: #6b7280;
  --text-nav: #6b7280;
  --text-nav-hover: #111827;
  --border-default: #e5e7eb;
  --border-card: #e5e7eb;
  --border-light: #d1d5db;
  --btn-secondary-bg: #ffffff;
  --btn-secondary-border: #d1d5db;
  --btn-secondary-text: #374151;
  --btn-secondary-hover-bg: #f9fafb;
  --btn-secondary-hover-border: #9ca3af;
  --divider-bg: rgba(209, 213, 219, 0.6);
  --bg-input: #ffffff;
  --border-input: #d1d5db;
  --text-input: #111827;
  --text-placeholder: #9ca3af;
}

/* Theme utility classes */
.bg-page { background-color: var(--bg-page); }
.bg-card { background-color: var(--bg-card); }
.bg-header { background-color: var(--bg-header); }
.bg-footer { background-color: var(--bg-footer); }
.bg-section-alt { background-color: var(--bg-section-alt); }
.hover\:bg-card-hover:hover { background-color: var(--bg-card-hover); }
.text-heading { color: var(--text-heading); }
.text-body { color: var(--text-body); }
.text-muted { color: var(--text-muted); }
.text-nav { color: var(--text-nav); }
.hover\:text-nav-hover:hover { color: var(--text-nav-hover); }
.border-page { border-color: var(--border-default); }
.border-card { border-color: var(--border-card); }
.border-light { border-color: var(--border-light); }
.divider-bg { background-color: var(--divider-bg); }

/* Mobile menu — hide disclosure triangle */
.mobile-menu summary::-webkit-details-marker {
  display: none;
}
.mobile-menu summary::marker {
  display: none;
  content: "";
}

/* Theme toggle button */
.theme-toggle {
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-nav);
  padding: 0.375rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.theme-toggle:hover {
  color: var(--text-nav-hover);
  border-color: var(--border-light);
}
.theme-toggle:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Theme-aware button secondary */
.btn-secondary {
  background-color: var(--btn-secondary-bg);
  border-color: var(--btn-secondary-border);
  color: var(--btn-secondary-text);
}
.btn-secondary:hover {
  background-color: var(--btn-secondary-hover-bg);
  border-color: var(--btn-secondary-hover-border);
}

/* Input fields */
.bg-input { background-color: var(--bg-input); }
.border-input { border-color: var(--border-input); }
.text-input { color: var(--text-input); }
.placeholder-input::placeholder { color: var(--text-placeholder); }

/* Section gradient divider */
.section-divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(to right, transparent, var(--divider-bg), transparent);
}

/* Wizard step indicators */
/* Dialog centering */
dialog[open] {
  margin: auto;
}

[data-tour-template-wizard-target="stepIndicator"].active {
  @apply bg-blue-600 text-white ring-2 ring-blue-300;
}
[data-tour-template-wizard-target="stepIndicator"].active .step-num { display: inline; }
[data-tour-template-wizard-target="stepIndicator"].active .check-icon { display: none; }

[data-tour-template-wizard-target="stepIndicator"].completed {
  @apply bg-green-500 text-white;
}
[data-tour-template-wizard-target="stepIndicator"].completed .step-num { display: none; }
[data-tour-template-wizard-target="stepIndicator"].completed .check-icon { display: inline; }

.field-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1px #ef4444;
}

/* FAQ accordion open state */
.bg-card.open svg[data-faq-target="chevron"] {
  transform: rotate(180deg);
}

/* Collapsed sidebar — narrow icon-only mode on desktop (1024px+) */
@media (min-width: 1024px) {
  aside.sidebar.is-collapsed {
    width: 64px !important;
  }

  aside.sidebar.is-collapsed .nav-label {
    display: none;
  }

  aside.sidebar.is-collapsed .sidebar-header {
    padding-left: 0;
    padding-right: 0;
    justify-content: center;
  }

  aside.sidebar.is-collapsed .account-name {
    display: none;
  }

  aside.sidebar.is-collapsed .sidebar-nav a {
    justify-content: center;
    padding: 0.625rem 0.5rem;
  }

  aside.sidebar.is-collapsed .sidebar-nav a svg:first-child {
    margin-right: 0;
  }

  aside.sidebar.is-collapsed .sidebar-collapse-btn {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  aside.sidebar.is-collapsed .sidebar-collapse-chevron {
    transform: rotate(180deg);
  }
}
