/*
 * KaziCollect 4.3.19 — Brand-safe Hover System
 * Keeps interactive states inside their semantic colour family and prevents
 * WordPress/theme/Elementor global hover colours (notably pink/magenta) from
 * leaking into KaziCollect controls.
 */

:root{
  --kc-hover-green:#0a3f31;
  --kc-hover-green-mid:#0f6b50;
  --kc-hover-green-soft:#e7f5ef;
  --kc-hover-green-softer:#f2faf6;
  --kc-hover-green-border:#b9ddcf;
  --kc-hover-orange:#d86f08;
  --kc-hover-orange-soft:#fff2e3;
  --kc-hover-red:#a92f24;
  --kc-hover-red-soft:#fcedeb;
  --kc-hover-neutral:#eef6f2;
}

/* KaziCollect links use the brand colour instead of theme accent colours. */
:is(.kc-dashboard-restore,[class^="kc-"],[class*=" kc-"]) a:not(.kc-rv2-call):not([class*="danger"]):not([class*="logout"]){
  text-decoration-color:currentColor;
}

@media (hover:hover) and (pointer:fine){
  /* ---------------------------------------------------------------
     NEUTRAL / WHITE CONTROLS
     Tabs, rows, icon controls and secondary buttons move into a soft
     green state rather than inheriting Elementor/WordPress pink.
     --------------------------------------------------------------- */
  .kc-dashboard-restore :is(
    .kc-subtab:not(.active),
    .kc-ui-tab:not(.active),
    .kc357-tab2:not(.active),
    .kc357-menurow,
    .kc-back-btn,
    .kc-header-avatar-wrap,
    .kc-theme-toggle,
    .kc-utility-action,
    .kc-more-row,
    .kc-wp-tab:not(.active),
    .kc-rw-location-btn,
    .kc-av-decline-btn,
    .kc-av-decline-cancel,
    .kc-msg2-select-btn,
    .kc-ni-markread-btn,
    .kc-help-faq-q,
    [class*="ghost"],
    [class*="secondary"]
  ):hover,
  :is([class^="kc-"],[class*=" kc-"]) :is(
    button[class*="tab"]:not(.active),
    button[class*="menu"],
    button[class*="row"],
    button[class*="ghost"],
    button[class*="secondary"]
  ):hover{
    background:var(--kc-hover-green-soft)!important;
    background-color:var(--kc-hover-green-soft)!important;
    color:#075540!important;
    border-color:var(--kc-hover-green-border)!important;
  }

  /* Header/utility icons are circular/square controls: keep the icon colour
     dark green while the surface becomes mint. */
  .kc-dashboard-restore .header-actions i:hover,
  .kc-dashboard-restore .kc-utility-bar :is(button,a):hover,
  .kc-dashboard-restore [class*="utility"] :is(button,a):hover{
    background:var(--kc-hover-green-soft)!important;
    color:#075540!important;
    border-color:var(--kc-hover-green-border)!important;
  }

  /* Sidebar/menu navigation. */
  .kc-dashboard-restore .nav-menu .nav-item:not(.active):not(.logout):hover,
  .kc-dashboard-restore .nav-menu a.nav-item:not(.active):not(.logout):hover{
    background:rgba(111,224,174,.14)!important;
    color:#fff!important;
  }
  .kc-dashboard-restore .nav-menu .nav-item:not(.active):not(.logout):hover i{
    color:#8ce8bd!important;
  }

  /* Active tabs remain green on hover, never switch to a foreign accent. */
  .kc-dashboard-restore :is(
    .kc-subtab.active,
    .kc-ui-tab.active,
    .kc357-tab2.active,
    .kc-wp-tab.active,
    .kc-appnav-item.active
  ):hover{
    background:#0b5f49!important;
    color:#fff!important;
    border-color:#0b5f49!important;
  }
  /* Some active tabs intentionally use a pale-green selected state. */
  .kc-dashboard-restore .kc357-tab2.active:hover{
    background:#e1f4eb!important;
    color:#076148!important;
    border-bottom-color:#08714d!important;
  }

  /* ---------------------------------------------------------------
     PRIMARY / SUCCESS ACTIONS — darker green on hover.
     --------------------------------------------------------------- */
  :is(.kc-dashboard-restore,[class^="kc-"],[class*=" kc-"]) :is(
    button[class*="save"],
    button[class*="submit"],
    button[class*="confirm"],
    button[class*="accept"],
    button[class*="verify"],
    a[class*="save"],
    a[class*="submit"],
    a[class*="confirm"],
    a[class*="accept"],
    a[class*="verify"],
    .kc-btn,
    .kc-cx-save,
    .kc-wp-submit:not(.danger-ish),
    .kc-av-accept-btn,
    .kc-ni-accept-btn,
    .kc-msg2-new-btn,
    .kc-msg2-compose-submit,
    .kc-rc-btn-next,
    .kc-rc-done-primary,
    .kc357-save,
    .kc357-editlink,
    .kc357-statuspill.kc357-verify-link
  ):hover{
    background:var(--kc-hover-green)!important;
    background-color:var(--kc-hover-green)!important;
    color:#fff!important;
    border-color:var(--kc-hover-green)!important;
  }

  /* Light-green action/chip surfaces become a slightly deeper mint. */
  :is(.kc-dashboard-restore,[class^="kc-"],[class*=" kc-"]) :is(
    [class*="quick"],
    [class*="completion-action"],
    [class*="chip"],
    [class*="pill"]
  ):hover{
    border-color:var(--kc-hover-green-border)!important;
  }
  .kc-dashboard-restore .kc357-completion-action.todo:hover,
  .kc-dashboard-restore .kc357-menurow:hover,
  .kc-dashboard-restore .kc357-editlink:hover{
    background:var(--kc-hover-green-soft)!important;
    color:#076148!important;
  }

  /* ---------------------------------------------------------------
     ORANGE / WARNING / LIVE-ROUTE ACTIONS — darker orange on hover.
     These overrides intentionally come after the generic primary rule.
     --------------------------------------------------------------- */
  :is(.kc-dashboard-restore,[class^="kc-"],[class*=" kc-"]) :is(
    .kc-rv2-primary,
    .kc-rv2-call,
    .kc-rv2-safety,
    [class*="orange"],
    [class*="warning"],
    [class*="cash"]
  ):hover{
    background:var(--kc-hover-orange)!important;
    background-color:var(--kc-hover-orange)!important;
    color:#fff!important;
    border-color:var(--kc-hover-orange)!important;
  }

  /* ---------------------------------------------------------------
     DANGER / DESTRUCTIVE ACTIONS — darker red, never pink.
     --------------------------------------------------------------- */
  :is(.kc-dashboard-restore,[class^="kc-"],[class*=" kc-"]) :is(
    button[class*="danger"],
    button[class*="delete"],
    button[class*="remove"],
    button[class*="reject"],
    button[class*="decline-confirm"],
    a[class*="danger"],
    a[class*="delete"],
    a[class*="remove"],
    a[class*="logout"],
    .kc-ni-clearall-btn,
    .kc-ni-delete-btn,
    .kc-msg2-thread-delete-btn,
    .kc-msg2-bubble-delete,
    .kc-wp-submit.danger-ish,
    .kc-av-decline-confirm
  ):hover{
    background:var(--kc-hover-red)!important;
    background-color:var(--kc-hover-red)!important;
    color:#fff!important;
    border-color:var(--kc-hover-red)!important;
  }

  /* Text-only destructive icons should retain a light red surface rather
     than turning into an oversized solid button. */
  .kc-dashboard-restore :is(.kc-ni-delete-btn,.kc-msg2-thread-delete-btn,.kc-msg2-bubble-delete):hover{
    background:var(--kc-hover-red-soft)!important;
    color:var(--kc-hover-red)!important;
    border-color:transparent!important;
  }

  /* Cards/list rows receive a subtle green border/surface cue. */
  .kc-dashboard-restore :is(
    .kc-av-card,
    .kc-msg2-thread-item,
    .kc-ni-item.clickable,
    .kc-wp-quick-card,
    .kc357-row[data-edit-field]
  ):hover{
    border-color:#c3dfd4!important;
    background-color:#f8fcfa!important;
  }

  /* Plain KaziCollect text links — only colour changes, no button fill. */
  :is([class^="kc-"],[class*=" kc-"]) a:not([class*="btn"]):not([class*="button"]):not(.nav-item):not(.kc-rv2-call):hover{
    color:#075540!important;
  }
}

/* Keyboard focus uses the same brand language. */
:is(.kc-dashboard-restore,[class^="kc-"],[class*=" kc-"]) :is(button,a,[role="button"]):focus-visible{
  outline:3px solid rgba(31,139,110,.22)!important;
  outline-offset:2px!important;
}
