
/* v167 DroneHQ light theme alignment layer
   Purpose: align custom Fleet, Business, Reports, detail, and Help surfaces with the Component Gallery light theme.
   Dark mode remains controlled by existing styles.
*/

:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"]) {
  --dhq-light-page: #eaf3fb;
  --dhq-light-surface: #ffffff;
  --dhq-light-surface-soft: #f6fbff;
  --dhq-light-surface-tint: #eef7ff;
  --dhq-light-border: #c8d8e8;
  --dhq-light-border-strong: #9fb9d4;
  --dhq-light-text: #0d2136;
  --dhq-light-muted: #50677d;
  --dhq-light-link: #0675bd;
  --dhq-light-primary: #0876c9;
  --dhq-light-primary-dark: #075f9f;
  --dhq-light-shadow: 0 18px 42px rgba(22, 62, 96, 0.14);
}

/* Workspace shells */
:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(
  .fleet-overview-shell,
  .fleet-workspace-shell,
  .business-workspace-shell,
  .reports-workspace-shell
) {
  background: var(--dhq-light-surface) !important;
  color: var(--dhq-light-text) !important;
  border-color: var(--dhq-light-border) !important;
  box-shadow: var(--dhq-light-shadow) !important;
}

/* Common cards / panels */
:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(
  .fleet-panel,
  .fleet-tab-card,
  .fleet-tab-table-panel,
  .fleet-card,
  .fleet-overview-card,
  .business-intel-line,
  .business-metric-row,
  .business-table-shell,
  .business-calendar-empty,
  .reports-intel-line,
  .reports-metric-row,
  .reports-table-shell,
  .reports-card,
  .reports-feature-grid article,
  .aircraft-detail-summary,
  .aircraft-detail-card,
  .battery-detail-summary,
  .battery-detail-card,
  .pilot-detail-summary,
  .pilot-detail-card,
  .equipment-detail-summary,
  .equipment-detail-card,
  .maintenance-detail-summary,
  .maintenance-detail-card
) {
  background: var(--dhq-light-surface) !important;
  color: var(--dhq-light-text) !important;
  border-color: var(--dhq-light-border) !important;
}

/* Secondary tinted areas */
:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(
  .business-section-tabs,
  .reports-section-tabs,
  .fleet-workspace-tabs,
  .fleet-section-tabs,
  .fleet-detail-kpis div,
  .battery-detail-kpis div,
  .pilot-detail-kpis div,
  .equipment-detail-kpis div,
  .maintenance-detail-kpis div,
  .equipment-approved-placeholder,
  .battery-approved-placeholder,
  .pilot-avatar-placeholder,
  .maintenance-rule-placeholder
) {
  background: var(--dhq-light-surface-tint) !important;
  color: var(--dhq-light-text) !important;
  border-color: var(--dhq-light-border) !important;
}

/* Text contrast */
:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(
  .fleet-overview-shell,
  .fleet-workspace-shell,
  .business-workspace-shell,
  .reports-workspace-shell,
  .fleet-panel,
  .business-panel,
  .reports-panel,
  .aircraft-detail-summary,
  .battery-detail-summary,
  .pilot-detail-summary,
  .equipment-detail-summary,
  .maintenance-detail-summary
)
:is(h1, h2, h3, h4, strong, th, td, dt, dd, label) {
  color: var(--dhq-light-text) !important;
}

:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(
  .fleet-overview-shell,
  .fleet-workspace-shell,
  .business-workspace-shell,
  .reports-workspace-shell,
  .fleet-panel,
  .business-panel,
  .reports-panel
)
:is(p, span, small, .subtle, .panel-subtitle) {
  color: var(--dhq-light-muted) !important;
}

:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(.eyebrow, .fleet-card-heading span, .business-panel-heading .eyebrow, .reports-panel-heading .eyebrow) {
  color: var(--dhq-light-primary) !important;
}

/* Tabs */
:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(
  .business-section-tabs button,
  .reports-section-tabs button,
  .fleet-workspace-tabs button,
  .fleet-section-tabs button
) {
  background: #f8fbff !important;
  color: var(--dhq-light-text) !important;
  border-color: var(--dhq-light-border-strong) !important;
  box-shadow: none !important;
}

:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(
  .business-section-tabs button.is-active,
  .reports-section-tabs button.is-active,
  .fleet-workspace-tabs button.is-active,
  .fleet-section-tabs button.is-active
) {
  background: linear-gradient(180deg, #2aa7f4, #0876c9) !important;
  color: #ffffff !important;
  border-color: #0876c9 !important;
}

/* Inputs, selects, tables */
:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(
  .business-filters,
  .reports-filters,
  .fleet-tab-filters
)
:is(input, select, button),
:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(
  .fleet-overview-shell,
  .business-workspace-shell,
  .reports-workspace-shell
)
:is(input, select, textarea) {
  background: #ffffff !important;
  color: var(--dhq-light-text) !important;
  border-color: var(--dhq-light-border-strong) !important;
}

:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(.business-table-shell, .reports-table-shell, .fleet-tab-table-shell) thead th {
  background: var(--dhq-light-surface-tint) !important;
  color: var(--dhq-light-text) !important;
  border-color: var(--dhq-light-border) !important;
}

/* Links and small action pills */
:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(
  .fleet-overview-shell,
  .business-workspace-shell,
  .reports-workspace-shell,
  .page-help-drawer,
  .help-drawer,
  .page-help-panel
) a {
  color: var(--dhq-light-link) !important;
}

/* Help drawer light theme */
:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(
  .page-help-drawer,
  .page-help-panel,
  .help-drawer,
  .help-panel,
  [data-page-help-drawer],
  [data-help-drawer]
) {
  background: var(--dhq-light-surface) !important;
  color: var(--dhq-light-text) !important;
  border-color: var(--dhq-light-border) !important;
}

:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(
  .page-help-drawer,
  .page-help-panel,
  .help-drawer,
  .help-panel,
  [data-page-help-drawer],
  [data-help-drawer]
)
:is(.help-card, .page-help-card, .help-section, .help-callout, .help-action, .help-tabs, .page-help-tabs, article, section) {
  background: var(--dhq-light-surface-soft) !important;
  color: var(--dhq-light-text) !important;
  border-color: var(--dhq-light-border) !important;
}

:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(
  .page-help-drawer,
  .page-help-panel,
  .help-drawer,
  .help-panel,
  [data-page-help-drawer],
  [data-help-drawer]
)
:is(h1, h2, h3, h4, strong, p, li, span, small, dt, dd) {
  color: var(--dhq-light-text) !important;
}

/* Empty states */
:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(.business-empty, .reports-empty, .fleet-tab-empty) {
  background: transparent !important;
  color: var(--dhq-light-muted) !important;
}

:where(html[data-theme="light"], body[data-theme="light"], html.theme-light, body.theme-light, html.light, body.light, html[data-bs-theme="light"], body[data-bs-theme="light"])
:is(.business-empty, .reports-empty, .fleet-tab-empty) strong {
  color: var(--dhq-light-text) !important;
}
