/* HostSteps Academy UI stabilization */
:root {
  color-scheme: light;
}

.header-profile {
  position: relative;
}

.header-profile .hsedu-profile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  cursor: pointer;
}

.header-profile .hsedu-profile-toggle:focus-visible,
.dlab-theme-mode:focus-visible,
.edu-password-toggle:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.18);
  outline-offset: 2px;
}

.header-profile .hsedu-profile-toggle img {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.header-profile .hsedu-profile-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  min-width: 260px;
  padding: 10px 0;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  z-index: 10050;
}

.header-profile.is-open .hsedu-profile-menu,
.header-profile .hsedu-profile-menu.show {
  display: block;
}

.header-profile .dropdown-item,
.header-profile .dropdown-item span,
.header-profile .dropdown-header,
.header-profile .edu-muted,
.header-profile strong {
  color: #111827 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.header-profile .dropdown-item {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  text-decoration: none;
  background: transparent;
}

.header-profile .dropdown-item:hover,
.header-profile .dropdown-item:focus-visible {
  background: #f8fafc;
}

.header-profile .border-bottom {
  border-color: rgba(15, 23, 42, 0.08) !important;
}

.dlab-theme-mode {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #f8fafc !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  cursor: pointer;
}

.dlab-theme-mode #icon-light,
.dlab-theme-mode #icon-dark {
  font-size: 18px;
}

html[data-theme-version="light"] .dlab-theme-mode #icon-light,
body[data-theme-version="light"] .dlab-theme-mode #icon-light,
html:not([data-theme-version]) .dlab-theme-mode #icon-light {
  display: none;
}

html[data-theme-version="light"] .dlab-theme-mode #icon-dark,
body[data-theme-version="light"] .dlab-theme-mode #icon-dark,
html:not([data-theme-version]) .dlab-theme-mode #icon-dark {
  display: inline-block;
}

html[data-theme-version="dark"] .dlab-theme-mode #icon-dark,
body[data-theme-version="dark"] .dlab-theme-mode #icon-dark {
  display: none;
}

html[data-theme-version="dark"] .dlab-theme-mode #icon-light,
body[data-theme-version="dark"] .dlab-theme-mode #icon-light {
  display: inline-block;
}

.edu-auth-form .mb-3.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: auto;
  margin-top: 6px;
  padding: 0;
}

.edu-auth-form input[type="checkbox"],
.edu-auth-form input.form-check-input[type="checkbox"] {
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  display: inline-block !important;
  vertical-align: middle !important;
  position: static !important;
  flex: 0 0 auto;
}

.edu-auth-form .form-check-label {
  margin: 0 !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  display: inline !important;
}

.edu-auth-form input[type="hidden"] {
  display: none !important;
}

.edu-password-wrap {
  position: relative;
}

.edu-password-wrap .edu-password-toggle {
  position: absolute;
  top: 50%;
  inset-inline-end: 10px;
  transform: translateY(-50%);
  z-index: 4;
  border: 0;
  background: transparent;
  color: var(--edu-primary);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 4px 6px;
  line-height: 1;
}

.edu-password-wrap input {
  padding-inline-end: 86px !important;
}

html[data-theme-version="dark"],
body[data-theme-version="dark"] {
  color-scheme: dark;
  background: #0b1220;
  color: #e5e7eb;
}

[data-theme-version="dark"] body,
[data-theme-version="dark"] .content-body,
[data-theme-version="dark"] .container-fluid,
[data-theme-version="dark"] .header,
[data-theme-version="dark"] .footer,
[data-theme-version="dark"] .dlabnav,
[data-theme-version="dark"] .nav-header {
  background-color: #0b1220 !important;
  color: #e5e7eb !important;
}

[data-theme-version="dark"] .header,
[data-theme-version="dark"] .nav-header,
[data-theme-version="dark"] .dlabnav,
[data-theme-version="dark"] .header-profile .hsedu-profile-toggle,
[data-theme-version="dark"] .dlab-theme-mode {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme-version="dark"] .header-profile .hsedu-profile-toggle,
[data-theme-version="dark"] .dlab-theme-mode,
[data-theme-version="dark"] .header-left .search-area input,
[data-theme-version="dark"] .search-area .form-control,
[data-theme-version="dark"] .search-form input[type="search"],
[data-theme-version="dark"] .edu-panel,
[data-theme-version="dark"] .edu-auth-card,
[data-theme-version="dark"] .edu-course-card,
[data-theme-version="dark"] .edu-instructor-card,
[data-theme-version="dark"] .edu-feature-card,
[data-theme-version="dark"] .edu-pricing-card,
[data-theme-version="dark"] .edu-dashboard-card,
[data-theme-version="dark"] .dropdown-menu,
[data-theme-version="dark"] .widget,
[data-theme-version="dark"] .edu-empty,
[data-theme-version="dark"] .edu-live-card,
[data-theme-version="dark"] .edu-pay-card,
[data-theme-version="dark"] .edu-brand-card {
  background: #111827 !important;
  color: #e5e7eb !important;
  border-color: #334155 !important;
}

[data-theme-version="dark"] .edu-auth-side,
[data-theme-version="dark"] .edu-launch-hero,
[data-theme-version="dark"] .edu-hero,
[data-theme-version="dark"] .edu-cta-strip {
  background: linear-gradient(135deg, #0f172a, #1d4ed8 60%, #0f766e) !important;
}

[data-theme-version="dark"] h1,
[data-theme-version="dark"] h2,
[data-theme-version="dark"] h3,
[data-theme-version="dark"] h4,
[data-theme-version="dark"] h5,
[data-theme-version="dark"] h6,
[data-theme-version="dark"] label,
[data-theme-version="dark"] p,
[data-theme-version="dark"] li,
[data-theme-version="dark"] .edu-muted,
[data-theme-version="dark"] .dropdown-item,
[data-theme-version="dark"] .dropdown-item span,
[data-theme-version="dark"] .header-right a,
[data-theme-version="dark"] .header-left input,
[data-theme-version="dark"] .widget-title,
[data-theme-version="dark"] .edu-stat-value,
[data-theme-version="dark"] .edu-section-title h3 {
  color: #e5e7eb !important;
}

[data-theme-version="dark"] .edu-stat-label,
[data-theme-version="dark"] .edu-template-subtitle,
[data-theme-version="dark"] .edu-mini-list li,
[data-theme-version="dark"] .edu-contact-list li,
[data-theme-version="dark"] .edu-auth-card .edu-muted,
[data-theme-version="dark"] .header-profile .edu-muted {
  color: #94a3b8 !important;
}

[data-theme-version="dark"] .edu-auth-form .edu-text-input,
[data-theme-version="dark"] .edu-auth-form input[type="text"],
[data-theme-version="dark"] .edu-auth-form input[type="email"],
[data-theme-version="dark"] .edu-auth-form input[type="password"],
[data-theme-version="dark"] .edu-auth-form input[type="search"],
[data-theme-version="dark"] .edu-auth-form select,
[data-theme-version="dark"] .edu-auth-form textarea {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
}

[data-theme-version="dark"] .edu-auth-form input::placeholder,
[data-theme-version="dark"] .edu-auth-form textarea::placeholder {
  color: #94a3b8 !important;
}

[data-theme-version="dark"] .edu-selected-plan {
  background: rgba(19, 138, 107, 0.15) !important;
  border-color: rgba(52, 211, 153, 0.25) !important;
  color: #ecfdf5 !important;
}

[data-theme-version="dark"] .edu-selected-plan strong {
  color: #6ee7b7 !important;
}

[data-theme-version="dark"] .header-profile .hsedu-profile-menu {
  background: #111827 !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45) !important;
}

[data-theme-version="dark"] .header-profile .dropdown-item:hover,
[data-theme-version="dark"] .header-profile .dropdown-item:focus-visible {
  background: #1f2937 !important;
}

[data-theme-version="dark"] .header-profile .dropdown-item,
[data-theme-version="dark"] .header-profile .dropdown-item span,
[data-theme-version="dark"] .header-profile strong,
[data-theme-version="dark"] .header-profile .edu-muted {
  color: #e5e7eb !important;
}

/* Contrast and readability stabilization */
.header-left .search-area .form-control,
.header-left .search-area input,
.header-left .search-area input[type="search"] {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

.header-left .search-area .form-control::placeholder,
.header-left .search-area input::placeholder,
.header-left .search-area input[type="search"]::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
}

.nav-header .brand-logo,
.nav-header .brand-logo strong,
.nav-header .brand-logo .edu-logo-note {
  color: #ffffff !important;
}

.edu-launch-hero .edu-stat-card,
.edu-hero .edu-stat-card {
  background: rgba(255,255,255,0.96) !important;
  border-color: rgba(255,255,255,0.75) !important;
}

.edu-launch-hero .edu-stat-label,
.edu-hero .edu-stat-label {
  color: #64748b !important;
}

.edu-launch-hero .edu-stat-value,
.edu-hero .edu-stat-value,
.edu-launch-hero .edu-stat-card strong,
.edu-hero .edu-stat-card strong {
  color: #0f172a !important;
}

.header-right .btn-outline-primary,
.header-right .btn-outline-secondary {
  background: #ffffff !important;
  color: #4338ca !important;
  border-color: #c7d2fe !important;
}

.header-right .btn-outline-primary:hover,
.header-right .btn-outline-secondary:hover {
  background: #eef2ff !important;
  color: #312e81 !important;
  border-color: #a5b4fc !important;
}

.dlabnav .metismenu > li > a,
.dlabnav .metismenu > li > a span,
.dlabnav .metismenu > li > a i {
  color: #e5e7eb;
}

.dlabnav .metismenu > li:hover > a,
.dlabnav .metismenu > li.mm-active > a {
  background: rgba(99,102,241,0.18) !important;
  color: #ffffff !important;
}

[data-theme-version="dark"] .nav-header,
[data-theme-version="dark"] .header,
[data-theme-version="dark"] .content-body,
[data-theme-version="dark"] .footer {
  background: #081121 !important;
}

[data-theme-version="dark"] .header-left .search-area .form-control,
[data-theme-version="dark"] .header-left .search-area input,
[data-theme-version="dark"] .header-left .search-area input[type="search"] {
  background: #0f172a !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}

[data-theme-version="dark"] .header-left .search-area .form-control::placeholder,
[data-theme-version="dark"] .header-left .search-area input::placeholder,
[data-theme-version="dark"] .header-left .search-area input[type="search"]::placeholder {
  color: #94a3b8 !important;
}

[data-theme-version="dark"] .edu-launch-hero .edu-stat-card,
[data-theme-version="dark"] .edu-hero .edu-stat-card {
  background: rgba(15,23,42,0.78) !important;
  border-color: rgba(148,163,184,0.28) !important;
  box-shadow: none !important;
}

[data-theme-version="dark"] .edu-launch-hero .edu-stat-label,
[data-theme-version="dark"] .edu-hero .edu-stat-label {
  color: #cbd5e1 !important;
}

[data-theme-version="dark"] .edu-launch-hero .edu-stat-value,
[data-theme-version="dark"] .edu-hero .edu-stat-value,
[data-theme-version="dark"] .edu-launch-hero .edu-stat-card strong,
[data-theme-version="dark"] .edu-hero .edu-stat-card strong {
  color: #f8fafc !important;
}

[data-theme-version="dark"] .header-right .btn-primary {
  background: #6366f1 !important;
  border-color: #6366f1 !important;
  color: #ffffff !important;
}

[data-theme-version="dark"] .header-right .btn-outline-primary,
[data-theme-version="dark"] .header-right .btn-outline-secondary {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border-color: #334155 !important;
}

[data-theme-version="dark"] .header-right .btn-outline-primary:hover,
[data-theme-version="dark"] .header-right .btn-outline-secondary:hover {
  background: #1e293b !important;
  color: #ffffff !important;
  border-color: #475569 !important;
}

[data-theme-version="dark"] .edu-section-title h3,
[data-theme-version="dark"] .edu-template-title,
[data-theme-version="dark"] .edu-feature-card h4,
[data-theme-version="dark"] .edu-panel h1,
[data-theme-version="dark"] .edu-panel h2,
[data-theme-version="dark"] .edu-panel h3,
[data-theme-version="dark"] .edu-panel h4 {
  color: #f8fafc !important;
}

[data-theme-version="dark"] .edu-section-title p,
[data-theme-version="dark"] .edu-template-subtitle,
[data-theme-version="dark"] .edu-meta,
[data-theme-version="dark"] .edu-muted,
[data-theme-version="dark"] .text-muted {
  color: #94a3b8 !important;
}

[data-theme-version="dark"] .edu-feature-icon,
[data-theme-version="dark"] .edu-stat-icon {
  background: rgba(99,102,241,0.16) !important;
  color: #c7d2fe !important;
}


/* Featured stat cards should keep the strong dark look in all modes */
.edu-stat-card--featured {
  background: #0b1220 !important;
  border: 1px solid rgba(99, 102, 241, 0.22) !important;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28) !important;
}

.edu-stat-card--featured .edu-stat-label {
  color: #a5b4fc !important;
}

.edu-stat-card--featured .edu-stat-value,
.edu-stat-card--featured strong,
.edu-stat-card--featured h4,
.edu-stat-card--featured p {
  color: #f8fafc !important;
}

.edu-stat-card--featured .edu-stat-icon {
  background: rgba(255, 255, 255, 0.96) !important;
  color: #059669 !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
}

.edu-stat-card--featured .edu-stat-icon i {
  color: #059669 !important;
}

body:not([data-theme-version="dark"]) .edu-stat-card--featured,
html:not([data-theme-version="dark"]) .edu-stat-card--featured {
  background: #0b1220 !important;
}

body:not([data-theme-version="dark"]) .edu-stat-card--featured .edu-stat-label,
html:not([data-theme-version="dark"]) .edu-stat-card--featured .edu-stat-label {
  color: #c7d2fe !important;
}

body:not([data-theme-version="dark"]) .edu-stat-card--featured .edu-stat-value,
html:not([data-theme-version="dark"]) .edu-stat-card--featured .edu-stat-value {
  color: #ffffff !important;
}

[data-theme-version="dark"] .edu-stat-card--featured {
  background: #0b1220 !important;
  border-color: rgba(99, 102, 241, 0.24) !important;
}

/* Keep auth flow inside theme pages instead of wp-login/wp-register */
body.login,
body.wp-login {
  background: #0b1220;
}
