/* PropPulser UI: contrast fixes for links inside light surfaces (alerts/banners/cards)
   Purpose: avoid low-visibility “light blue link on light banner” issues across the app.
   This file is intentionally small and loaded after proppilot.css (+ optional theme).
*/

.alert a:not(.btn),
.pp-alert a:not(.btn),
.bg-light a:not(.btn),
.bg-white a:not(.btn),
.bg-body a:not(.btn),
.bg-body-tertiary a:not(.btn),
.pp-card .alert a:not(.btn) {
  color: inherit;
  text-decoration: underline;
  font-weight: 600;
  text-underline-offset: 2px;
}

/* Muted text inside light alerts can become unreadable on the dark UI
   because proppilot.css intentionally forces .pp-bg .text-muted to a
   light color (for dark surfaces). Override that ONLY within light
   alert surfaces.
*/
.pp-bg .alert .text-muted,
.pp-bg .pp-alert .text-muted,
.pp-bg .alert .text-body-secondary,
.pp-bg .pp-alert .text-body-secondary,
.pp-bg .alert .pp-muted,
.pp-bg .pp-alert .pp-muted {
  color: rgba(0, 0, 0, .65) !important;
}

.alert a:not(.btn):hover,
.pp-alert a:not(.btn):hover,
.bg-light a:not(.btn):hover,
.bg-white a:not(.btn):hover,
.bg-body a:not(.btn):hover,
.bg-body-tertiary a:not(.btn):hover,
.pp-card .alert a:not(.btn):hover {
  opacity: .85;
}

/* --------------------------------------------------------------------------
   File inputs (dark shell)
   Some browsers ignore theme tokens for <input type="file"> and render the
   filename portion as black-on-white, even inside our .pp-bg dark UI.
   Apply high-specificity, after-core overrides to keep file upload controls
   readable and consistent across pages.
   ------------------------------------------------------------------------ */

.pp-bg input[type="file"].form-control,
.pp-bg input[type="file"].pp-input{
  color: rgba(255,255,255,.92) !important;
  -webkit-text-fill-color: rgba(255,255,255,.92) !important;
  background-color: rgba(15,23,42,.55) !important;
  border-color: rgba(255,255,255,.16) !important;
  color-scheme: dark;
}

.pp-bg input[type="file"].form-control::file-selector-button,
.pp-bg input[type="file"].pp-input::file-selector-button,
.pp-bg input[type="file"].form-control::-webkit-file-upload-button,
.pp-bg input[type="file"].pp-input::-webkit-file-upload-button{
  margin-right: .75rem;
  padding: .375rem .75rem;
  border-radius: .375rem;
  border: 1px solid rgba(255,255,255,.18) !important;
  background: rgba(255,255,255,.10) !important;
  color: rgba(255,255,255,.92) !important;
  -webkit-text-fill-color: rgba(255,255,255,.92) !important;
}

.pp-bg input[type="file"].form-control::file-selector-button:hover,
.pp-bg input[type="file"].pp-input::file-selector-button:hover,
.pp-bg input[type="file"].form-control::-webkit-file-upload-button:hover,
.pp-bg input[type="file"].pp-input::-webkit-file-upload-button:hover{
  background: rgba(255,255,255,.16) !important;
}
