/* Keep the plugin's visual system while following the site's active theme font. */
.labvotos-widget,
.labvotos-portal,
.labvotos-results,
.labvotos-services-shell,
.labvotos-profiles,
.labvotos-colinha,
.labvotos-widget button,
.labvotos-widget input,
.labvotos-widget select,
.labvotos-portal button,
.labvotos-portal input,
.labvotos-portal select,
.labvotos-results button,
.labvotos-results input,
.labvotos-results select,
.labvotos-services-shell button,
.labvotos-services-shell input,
.labvotos-services-shell select,
.labvotos-profiles button,
.labvotos-profiles input,
.labvotos-profiles select,
.labvotos-colinha button,
.labvotos-colinha input,
.labvotos-colinha select {
  font-family: inherit !important;
}

/* This display label previously forced Arial Narrow. */
.labvotos-profile-overlay > strong {
  font-family: inherit !important;
}

/*
 * The public modules live inside the client's WordPress theme. Use the
 * theme's own design tokens when they are available, with conservative
 * fallbacks for classic themes that do not expose CSS variables.
 */
.labvotos-widget,
.labvotos-portal,
.labvotos-results,
.labvotos-services-shell,
.labvotos-profiles,
.labvotos-colinha {
  --lv-theme-primary: var(--e-global-color-primary, var(--global-palette1, var(--wp--preset--color--primary, var(--wp--preset--color--vivid-green-cyan, #198754))));
  --lv-theme-secondary: var(--e-global-color-secondary, var(--global-palette2, var(--wp--preset--color--secondary, var(--wp--preset--color--vivid-green-cyan, #59d7b2))));
  --lv-theme-accent: var(--e-global-color-accent, var(--global-palette3, var(--wp--preset--color--accent, var(--wp--preset--color--vivid-green-cyan, #2fb344))));
  --lv-theme-ink: var(--e-global-color-text, var(--global-palette3, var(--wp--preset--color--contrast, var(--wp--preset--color--black, #17202b))));
  --lv-theme-surface: var(--e-global-color-background, var(--global-palette9, var(--wp--preset--color--base, var(--wp--preset--color--white, #fff))));
  --lv-blue: var(--lv-theme-primary) !important;
  --lv-primary: var(--lv-theme-primary) !important;
  --lv-accent: var(--lv-theme-accent) !important;
  --lv-ink: var(--lv-theme-ink) !important;
}

/* Keep actions, links, focus states and election controls in the client's palette. */
.labvotos-widget a,
.labvotos-portal a,
.labvotos-results a,
.labvotos-services-shell a,
.labvotos-profiles a,
.labvotos-colinha a,
.labvotos-widget header strong,
.labvotos-tse-election strong,
.labvotos-tse-candidate > span:last-child b,
.labvotos-profile-tabs button.is-active,
.labvotos-profile-detail > footer a {
  color: var(--lv-theme-primary) !important;
}

.labvotos-services-shell .labvotos-service-action,
.labvotos-tse-offices button.is-active,
.labvotos-colinha-generate,
.labvotos-colinha-output button,
.labvotos-profile-pagination button:not(:disabled) {
  background: var(--lv-theme-primary) !important;
  border-color: var(--lv-theme-primary) !important;
}

.labvotos-services-shell .labvotos-service-action,
.labvotos-services-shell .labvotos-service-more {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 180px !important;
  min-width: 180px !important;
  height: 58px !important;
  min-height: 58px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  line-height: 1.2 !important;
  text-align: center !important;
}

.labvotos-services-shell .labvotos-service-action {
  color: #fff !important;
}

.labvotos-services-shell .labvotos-service-more,
.labvotos-tse-offices button,
.labvotos-tse-tabs button.is-active,
.labvotos-colinha-output button:last-child {
  color: var(--lv-theme-primary) !important;
  border-color: var(--lv-theme-primary) !important;
}

.labvotos-tse-offices button.is-active,
.labvotos-colinha-output button:last-child:hover {
  color: #fff !important;
}

@media (max-width: 600px) {
  .labvotos-services-shell .labvotos-service-action,
  .labvotos-services-shell .labvotos-service-more {
    width: 100% !important;
    min-width: 0 !important;
    height: 52px !important;
    min-height: 52px !important;
  }
}

.labvotos-tse-tabs button.is-active {
  border-bottom-color: var(--lv-theme-primary) !important;
}

/* Keep both colinha actions readable when a theme does not expose a usable palette. */
.labvotos-colinha-output button,
.labvotos-colinha-output button:last-child {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 50px !important;
  color: #fff !important;
  background: var(--lv-theme-primary, #198754) !important;
  border: 1px solid var(--lv-theme-primary, #198754) !important;
  line-height: 1.2 !important;
  text-indent: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.labvotos-colinha-output button:hover,
.labvotos-colinha-output button:last-child:hover {
  color: #fff !important;
  background: color-mix(in srgb, var(--lv-theme-primary, #198754) 86%, #000) !important;
  border-color: color-mix(in srgb, var(--lv-theme-primary, #198754) 86%, #000) !important;
}

.labvotos-tse-location > span,
.labvotos-tse-notice {
  color: var(--lv-theme-secondary) !important;
}

.labvotos-tse-location small b {
  background: var(--lv-theme-primary) !important;
}

.labvotos-tse-notice {
  border-left-color: var(--lv-theme-secondary) !important;
  background: color-mix(in srgb, var(--lv-theme-secondary) 12%, var(--lv-theme-surface)) !important;
}

.labvotos-widget button:focus-visible,
.labvotos-widget input:focus,
.labvotos-widget select:focus,
.labvotos-portal button:focus-visible,
.labvotos-portal input:focus,
.labvotos-portal select:focus,
.labvotos-results button:focus-visible,
.labvotos-results input:focus,
.labvotos-results select:focus,
.labvotos-services-shell button:focus-visible,
.labvotos-services-shell input:focus,
.labvotos-services-shell select:focus,
.labvotos-profiles button:focus-visible,
.labvotos-profiles input:focus,
.labvotos-profiles select:focus,
.labvotos-colinha button:focus-visible,
.labvotos-colinha input:focus,
.labvotos-colinha select:focus {
  outline-color: color-mix(in srgb, var(--lv-theme-primary) 32%, transparent) !important;
}

.labvotos-portal-card:hover,
.labvotos-portal-card:focus-visible {
  border-color: color-mix(in srgb, var(--lv-theme-primary) 48%, #dfe4ea) !important;
}

.labvotos-portal-icon,
.labvotos-demo,
.labvotos-percent {
  color: var(--lv-theme-primary) !important;
  background: color-mix(in srgb, var(--lv-theme-primary) 10%, var(--lv-theme-surface)) !important;
}

.labvotos-track i,
.labvotos-profile-bars > div > i em,
.labvotos-colinha-progress button.is-done span,
.labvotos-colinha-progress button.is-active span {
  background: var(--lv-theme-primary) !important;
}
