/* ================================================================
   Impreza Child — Plugin Dark Overrides
   Targets frontend CSS injected by active plugins.

   INTENTIONAL CUSTOM STYLES PRESERVED (do not override):
   - .gta-button  — cyan (#00e5ff) border/text, set in Customizer
   - .rr-wrap     — orange (#ff6b35) focus/button, set in Customizer
   - #80cbc4 spans — teal text on specific headings (inline styles)
   ================================================================ */

/* ------------------------------------------------------------------
   1. Formidable Forms (formidable / formidable-pro)
      Classes: .frm_forms, .frm_form_field, .frm_error, etc.
------------------------------------------------------------------ */
.frm_forms,
.frm_form_field,
.frm_fields_container {
  background-color: transparent !important;
  color: var(--text) !important;
}

.frm_forms label,
.frm_forms .frm_primary_label {
  color: var(--text) !important;
  font-weight: 500;
}

.frm_forms input[type="text"],
.frm_forms input[type="email"],
.frm_forms input[type="number"],
.frm_forms input[type="url"],
.frm_forms input[type="tel"],
.frm_forms input[type="password"],
.frm_forms input[type="date"],
.frm_forms textarea,
.frm_forms select,
.frm_forms .frm_form_field input,
.frm_forms .frm_form_field textarea,
.frm_forms .frm_form_field select {
  background-color: var(--input) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
}

.frm_forms input:focus,
.frm_forms textarea:focus,
.frm_forms select:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(246,201,14,.15) !important;
  outline: none !important;
}

/* Formidable submit / nav buttons */
.frm_forms .frm_submit button,
.frm_forms .frm_submit input[type="submit"],
.frm_button_submit {
  background-color: var(--gold) !important;
  color: #0d0f18 !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
}

.frm_forms .frm_submit button:hover,
.frm_forms .frm_submit input[type="submit"]:hover {
  background-color: var(--gold-lt) !important;
}

/* Error / success messages */
.frm_error,
.frm_form_field .frm_error {
  color: var(--red) !important;
  background-color: rgba(248,81,73,.1) !important;
  border-left: 3px solid var(--red) !important;
  padding: 6px 10px !important;
  border-radius: 0 4px 4px 0 !important;
}

.frm_message {
  background-color: rgba(63,185,80,.1) !important;
  border-left: 3px solid var(--green) !important;
  color: var(--green) !important;
  padding: 12px 16px !important;
  border-radius: 0 8px 8px 0 !important;
}

/* Formidable steps / progress bar */
.frm_rootline_title,
.frm_rootline span {
  color: var(--muted) !important;
}

.frm_rootline .frm_current_step .frm_rootline_title {
  color: var(--gold) !important;
}

/* ------------------------------------------------------------------
   2. Formidable Chat (formidable-chat)
------------------------------------------------------------------ */
.frm-chat-container,
.frm-chat-message-list {
  background-color: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}

.frm-chat-message {
  background-color: var(--bg) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}

.frm-chat-message.frm-chat-mine {
  background-color: var(--gold-dim) !important;
  border-color: var(--gold) !important;
}

/* ------------------------------------------------------------------
   3. CR Race Stats (cr-race-stats)
      Targets shortcode output classes
------------------------------------------------------------------ */
.cr-stats-wrap,
.cr-leaderboard,
.cr-stats-container,
[class^="cr-"],
[class*=" cr-"] {
  background-color: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  color: var(--text) !important;
}

.cr-stats-wrap table,
.cr-leaderboard table {
  background-color: transparent !important;
}

.cr-stats-wrap th,
.cr-leaderboard th {
  background-color: var(--bg) !important;
  color: var(--gold) !important;
  border-color: var(--border) !important;
}

.cr-stats-wrap td,
.cr-leaderboard td {
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.cr-stats-wrap tr:hover td,
.cr-leaderboard tr:hover td {
  background-color: var(--gold-dim) !important;
}

/* Rank numbers */
.cr-rank-1 td:first-child { color: var(--gold) !important; font-weight: 800; }
.cr-rank-2 td:first-child { color: #c0c0c0 !important; font-weight: 700; }
.cr-rank-3 td:first-child { color: #cd7f32 !important; font-weight: 700; }

/* Search/filter bar within plugin */
.cr-search-bar input,
.cr-filter-bar select {
  background-color: var(--input) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
}

/* ------------------------------------------------------------------
   4. GTA Vehicle Database (gta-vehicle-database)
------------------------------------------------------------------ */
.gta-vehicle-db,
.gvd-container,
.gvd-wrap,
[class^="gvd-"],
[class*=" gvd-"] {
  background-color: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  color: var(--text) !important;
}

.gvd-table th {
  background-color: var(--bg) !important;
  color: var(--gold) !important;
}

.gvd-table td {
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.gvd-table tr:hover td {
  background-color: var(--gold-dim) !important;
}

.gvd-search input,
.gvd-filter select {
  background-color: var(--input) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
}

/* Vehicle cards */
.gvd-vehicle-card,
.gvd-card {
  background-color: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}

.gvd-vehicle-card:hover,
.gvd-card:hover {
  border-color: var(--gold) !important;
  box-shadow: var(--shadow) !important;
}

/* ------------------------------------------------------------------
   5. Raycin Track Manager (raycin-track-manager)
      Custom plugin — targets its shortcode wrapper classes
------------------------------------------------------------------ */
.raycin-tm,
.rtm-wrap,
.rtm-container,
.rtm-section,
[class^="rtm-"],
[class*=" rtm-"] {
  background-color: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  color: var(--text) !important;
}

.rtm-table th {
  background-color: var(--bg) !important;
  color: var(--gold) !important;
  border-color: var(--border) !important;
}

.rtm-table td {
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.rtm-table tr:hover td {
  background-color: var(--gold-dim) !important;
}

/* Race event cards */
.rtm-event-card,
.rtm-race-card,
.rtm-track-card {
  background-color: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}

.rtm-event-card:hover,
.rtm-race-card:hover,
.rtm-track-card:hover {
  border-color: var(--gold) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow) !important;
}

/* Event title / meta */
.rtm-event-title,
.rtm-track-name {
  color: var(--gold) !important;
  font-weight: 700;
}

.rtm-event-meta,
.rtm-race-meta {
  color: var(--muted) !important;
  font-size: 12px;
}

/* Member dashboard panels */
.rtm-dashboard,
.rtm-member-panel {
  background-color: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 20px !important;
}

/* ------------------------------------------------------------------
   6. Raycin Whitelist Apply (raycin-whitelist-apply)
------------------------------------------------------------------ */
.raycin-apply-form,
.rwl-form,
[class^="rwl-"] {
  background-color: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 24px !important;
  color: var(--text) !important;
}

/* ------------------------------------------------------------------
   7. Leaflet Maps (used by CR Race Stats & Track Manager)
      Can't change tile layer here but can dark the UI controls
------------------------------------------------------------------ */
.leaflet-control-zoom a,
.leaflet-bar a {
  background-color: var(--card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.leaflet-control-zoom a:hover,
.leaflet-bar a:hover {
  background-color: var(--gold-dim) !important;
  color: var(--gold) !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background-color: var(--card) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
}

.leaflet-popup-content a {
  color: var(--gold) !important;
}

/* ------------------------------------------------------------------
   8. Rank Math SEO (breadcrumbs, snippets)
      Already in dark.css but extra specificity here just in case
------------------------------------------------------------------ */
.rank-math-breadcrumb p {
  margin: 0;
  color: var(--muted) !important;
}

/* ------------------------------------------------------------------
   9. ARMember (armember / armember-membership) — login / register / account
      This site uses ARMember's MATERIAL "notched-outline" skin: the visible
      box is .arm-notched-outline (3 pieces) and the <input> sits inside it
      TRANSPARENT. So we style the OUTLINE and keep the input clean — putting a
      border/bg on the input itself double-boxes it.
------------------------------------------------------------------ */
.arm_form,
.arm_form .arm_form_main_content,
.arm_form .arm_first_section,
.arm_form .arm_form_guts,
.arm_form .arm_form_fields_wrapper {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--text) !important;
}
/* CONSTRAIN the form to the branded card — ARMember gives it a wider default
   width, so it was spilling past the centred card. Force everything to 100%. */
.arm_form,
.arm_form .arm_form_main_content,
.arm_form .arm_first_section,
.arm_form .arm_form_guts,
.arm_form .arm_form_fields_wrapper,
.arm_form .arm-df__form,
.arm_form .arm-df__form-fields,
.arm_form .arm-df__form-field-wrap,
.arm_form .arm-df__form-field,
.arm_form .arm-df__form-group,
.arm_form .arm-control-group,
.arm_form .arm-df__form-control,
.arm_form .arm_material_input {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  float: none !important;
  left: auto !important;
  right: auto !important;
}
/* hide the redundant in-form heading ("Please Signup") — page already shows the title */
.arm_form .arm-df__heading,
.arm_form .arm-df__heading-text,
.arm_form .arm_form_title { display: none !important; }
/* the input itself: transparent + borderless (the notched outline is the box) */
.arm_form input[type="text"],
.arm_form input[type="email"],
.arm_form input[type="password"],
.arm_form input[type="tel"],
.arm_form input[type="number"],
.arm_form input[type="url"],
.arm_form input[type="search"],
.arm_form select,
.arm_form textarea,
.arm_form .arm-df__form-control,
.arm_form .arm_material_input {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--text) !important;
  border-radius: 0 !important;
}
.arm_form input::placeholder,
.arm_form textarea::placeholder { color: #5a6273 !important; }
/* the notched outline = the visible field box */
.arm_form .arm-notched-outline__leading,
.arm_form .arm-notched-outline__notch,
.arm_form .arm-notched-outline__trailing {
  border-color: var(--border) !important;
  background: transparent !important;
}
/* focus → gold outline (input is a previous sibling of the outline) */
.arm_form .arm-df__form-control:focus ~ .arm-notched-outline .arm-notched-outline__leading,
.arm_form .arm-df__form-control:focus ~ .arm-notched-outline .arm-notched-outline__notch,
.arm_form .arm-df__form-control:focus ~ .arm-notched-outline .arm-notched-outline__trailing {
  border-color: var(--gold) !important;
}
/* labels (floating + checkbox) — muted, no white chip */
.arm_form label,
.arm_form .arm-df__label-text,
.arm_form .arm-df__fc-checkbox--label,
.arm_form .arm-df__form-label {
  color: var(--muted) !important;
  background: transparent !important;
}
/* show-password / field icons */
.arm_form .arm-df__fc-icon { color: var(--muted) !important; background: transparent !important; }
/* tighten the tall Material fields to a normal height */
.arm_form .arm-df__form-control,
.arm_form .arm_material_input {
  min-height: 48px !important;
  padding: 0 .95rem !important;
  line-height: 48px !important;
}
.arm_form .arm-df__form-field,
.arm_form .arm-df__form-field-wrap { margin-bottom: .5rem !important; }
/* submit button — match the homepage rh-btn: dark pill + gold dot + light text */
.arm_form .arm-df__form-group_submit,
.arm_form .arm-df__form-field-wrap_submit { text-align: center !important; }
.arm_form .arm_button,
.arm_form button[type="submit"],
.arm_form input[type="submit"],
.arm_form .arm-df__form-control-submit-btn,
.arm_form .arm_submit_btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .6rem !important;
  background: #1c1f2e !important;
  color: #eef0f5 !important;
  border: 1px solid #303448 !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  font-size: .9rem !important;
  letter-spacing: .02em !important;
  text-transform: none !important;
  padding: .8rem 1.9rem !important;
  width: auto !important;
  min-width: 200px !important;
  height: auto !important;
  line-height: 1.2 !important;
  margin: .8rem auto 0 !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.35) !important;
  text-shadow: none !important;
  transition: all .2s ease !important;
}
/* the gold "dot" before the label, like rh-btn */
.arm_form .arm_button::before,
.arm_form button[type="submit"]::before,
.arm_form .arm-df__form-control-submit-btn::before {
  content: '' !important;
  display: inline-block !important;
  width: 9px !important; height: 9px !important;
  border-radius: 50% !important;
  background: #f6c90e !important;
  box-shadow: 0 0 6px rgba(246,201,14,.65) !important;
  flex-shrink: 0 !important;
}
.arm_form .arm_button:hover,
.arm_form button[type="submit"]:hover,
.arm_form .arm-df__form-control-submit-btn:hover {
  border-color: rgba(246,201,14,.5) !important;
  background: #232741 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.4), 0 0 16px rgba(246,201,14,.12) !important;
  filter: none !important;
}
.arm_form .arm-waves-effect { background-color: transparent !important; }
/* links + checkboxes */
.arm_form a { color: var(--gold) !important; }
.arm_form input[type="checkbox"],
.arm_form input[type="radio"] { accent-color: var(--gold); }

/* --- Footer links (Lost Your Password / "Dont have account? SIGNUP") ---
   ARMember's arm_form_style.css FLOATS these (float:left) so they collide
   with the LOGIN button, and colours them blue (var(--arm-pt-theme-blue)).
   Those rules tie my .arm_form selectors on specificity and win on load
   order, so we scope under #rh (the branded page wrapper) — the id beats all
   of ARMember's class-only rules regardless of order. */
#rh .arm_form .arm-df__form-group_forgot_link,
#rh .arm_form .arm_forgot_password_below_link,
#rh .arm_form .arm_forgotpassword_link,
#rh .arm_form .arm_login_links_wrapper,
#rh .arm_form .arm_login_options,
#rh .arm_form .arm_socialicons_bottom,
#rh .arm_form .arm_registration_link,
#rh .arm_form .arm_reg_login_links {
  float: none !important;
  position: static !important;
  width: 100% !important;
  max-width: 100% !important;
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  clear: both !important;
  display: block !important;
  direction: ltr !important;
}
#rh .arm_form .arm-df__form-group_forgot_link,
#rh .arm_form .arm_forgot_password_below_link { margin: 0 auto 1.4rem !important; }
#rh .arm_form .arm_login_links_wrapper,
#rh .arm_form .arm_login_options,
#rh .arm_form .arm_socialicons_bottom { margin: 1.4rem auto 0 !important; }
/* give the submit button its own row + clearance so nothing overlaps it */
#rh .arm_form .arm-df__form-group_submit,
#rh .arm_form .arm-df__form-field-wrap_submit {
  clear: both !important;
  float: none !important;
  width: 100% !important;
  text-align: center !important;
  margin: .4rem 0 .4rem !important;
}
/* lead text ("Dont have account?", descriptions) → muted, small */
#rh .arm_form .arm_registration_link,
#rh .arm_form .arm_reg_login_links,
#rh .arm_form .arm_forgot_password_description { color: var(--muted) !important; font-size: .85rem !important; }
/* the actual anchor text (Lost Your Password / SIGNUP) → gold, no underline */
#rh .arm_form .arm_login_popup_form_links,
#rh .arm_form .arm_form_popup_ahref,
#rh .arm_form a.arm_form_popup_ahref,
#rh .arm_form .arm_forgotpassword_link a,
#rh .arm_form .arm_registration_link a,
#rh .arm_form .arm_reg_login_links a {
  color: var(--gold) !important;
  text-decoration: none !important;
  font-weight: 700 !important;
}
#rh .arm_form .arm_login_popup_form_links:hover,
#rh .arm_form .arm_form_popup_ahref:hover,
#rh .arm_form .arm_forgotpassword_link a:hover,
#rh .arm_form .arm_registration_link a:hover,
#rh .arm_form .arm_reg_login_links a:hover { text-decoration: underline !important; color: #ffd84d !important; }
/* messages */
.arm_form .arm_error_msg,
.arm_response_msg.arm_error,
.arm_validation_error,
.arm_form .arm-df__error { color: var(--red) !important; }
.arm_form .arm_success_msg,
.arm_response_msg.arm_success { color: var(--green) !important; }
/* hide the "Powered by ARMember" credit (fallback if no admin toggle) */
.arm_powered_by,
.arm_form .arm_powered_by,
.armember_powered_by,
.arm_credit,
.arm_form_powered,
a[href*="armember.com"] { display: none !important; }

/* ============================================================================
   9b. ARMember MEMBER PANEL  ([arm_member_panel])
   ARMember injects an inline <style id="arm_member_panel"> (loaded AFTER this
   file, many !important) that forces a white/blue/grey skin. We scope every
   override under #rh (the branded template wrapper) so id-specificity beats
   the inline class rules regardless of source order.
   ============================================================================ */
/* --- containers: kill the white, go dark --- */
#rh .arm-panel-container,
#rh .arm-panel-content,
#rh .arm-panel-sidebar,
#rh .arm-panel-detail,
#rh .arm-panel-data-container,
#rh .arm-panel-content-header,
#rh .arm-panel-padding,
#rh .arm_panel_menu_items {
  background-color: transparent !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
#rh .arm-panel-container {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  overflow: hidden !important;
}
#rh .arm-panel-sidebar { border-right: 1px solid var(--border) !important; }
#rh .arm-panel-content { border: 0 !important; border-left: 1px solid var(--border) !important; }

/* --- sidebar menu items --- */
#rh .arm-menu-item,
#rh .arm-menu-item-txt { color: var(--muted) !important; }
#rh .arm-menu-item:hover {
  background-color: rgba(255,255,255,.04) !important;
  border-radius: 10px !important;
}
#rh .arm-menu-item:hover .arm-menu-item-txt { color: var(--text) !important; }
/* active item → gold pill, dark text/icon (like a Raycin accent) */
#rh .arm-panel-menu-item-active.arm-menu-item {
  background-color: var(--gold) !important;
  background-image: none !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 14px rgba(246,201,14,.25) !important;
}
#rh .arm-panel-menu-item-active.arm-menu-item .arm-menu-item-txt { color: #1a1205 !important; font-weight: 700 !important; }
/* icons (inline SVG use currentColor / fill) */
#rh .arm-panel-menu-item-icon,
#rh .arm-panel-svg-content-color,
#rh .arm-panel-menu-item-icon svg,
#rh .arm-panel-svg-content-color svg,
#rh .arm-panel-menu-item-icon svg path,
#rh .arm-panel-svg-content-color svg path { color: var(--muted) !important; fill: var(--muted) !important; }
#rh .arm-panel-menu-item-active.arm-menu-item .arm-panel-menu-item-icon svg path,
#rh .arm-panel-menu-item-active.arm-menu-item .arm-panel-svg-content-color svg path { color: #1a1205 !important; fill: #1a1205 !important; }

/* --- sidebar profile (username + logout) --- */
#rh .arm-panel-sidebar-username { color: var(--text) !important; font-weight: 700 !important; }
#rh .arm-panel-sidebar-profile-action,
#rh .arm_dashboard_logout_link { color: var(--muted) !important; }
#rh .arm-panel-sidebar-profile-action:hover,
#rh .arm_dashboard_logout_link:hover { color: var(--gold) !important; }
#rh .arm-panel-logout-icon svg path { fill: currentColor !important; color: inherit !important; }

/* --- headings / tab heading --- */
#rh .arm-panel-tab-heading,
#rh .arm-panel-content-header,
#rh .arm-panel-content-header * { color: var(--text) !important; }

/* --- tables --- */
#rh .arm-panel-table { background: transparent !important; border-color: var(--border) !important; }
#rh .arm-panel-table thead,
#rh .arm-panel-table thead tr,
#rh .arm-panel-table th {
  background-color: var(--input) !important;
  color: var(--muted) !important;
  border-color: var(--border) !important;
}
#rh .arm-panel-table tbody,
#rh .arm-panel-table td,
#rh .arm-panel-table tr {
  background-color: transparent !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
#rh .arm-panel-table tbody tr:hover td { background-color: rgba(255,255,255,.03) !important; }

/* --- empty state ("There is no membership found.") --- */
#rh .arm_current_membership_container,
#rh .arm_no_data,
#rh .arm-panel-no-data,
#rh .arm-panel-data-container p,
#rh .arm-panel-data-container span { color: var(--muted) !important; }

/* --- generic catch-alls inside the panel: stray white boxes / blue text --- */
#rh .arm-panel-container [style*="background-color: #FFFFFF"],
#rh .arm-panel-container [style*="background:#FFFFFF"],
#rh .arm-panel-container [style*="background: #fff"] { background-color: transparent !important; }
#rh .arm-panel-container a { color: var(--gold) !important; }
#rh .arm-panel-container input,
#rh .arm-panel-container select,
#rh .arm-panel-container textarea {
  background-color: var(--input) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
