/*
 * KaziTasks Core v2.4.92 — balanced theme isolation
 *
 * Goals:
 * 1) Keep all KaziTasks app/dashboard/auth fields at an exact 10px radius.
 * 2) Stop Hello Elementor/site-kit pink or magenta accent colours from leaking
 *    into KaziTasks hover/focus/tap states.
 * 3) Preserve the APPROVED KaziTasks component styling. In particular, do not
 *    turn classless KaziTasks Quick Actions or header controls into solid orange.
 */

/* Elementor/site-kit variables are deliberately neutralised to KaziTasks NAVY.
 * KaziTasks' intentional orange accents use --kta-orange / component styles and
 * are therefore unaffected by this guardrail. */
body.kt-app-mode,
body.kt-dashboard-page,
body.kt-kazitasks-auth-page,
body.kt-app-mode .elementor,
body.kt-dashboard-page .elementor,
body.kt-kazitasks-auth-page .elementor,
body.kt-app-mode .e-con,
body.kt-dashboard-page .e-con,
body.kt-kazitasks-auth-page .e-con,
body.kt-app-mode .ktapp-shell,
body.kt-app-mode .ktapp-shell * {
  --e-global-color-primary:#123A78!important;
  --e-global-color-secondary:#0F2A56!important;
  --e-global-color-text:#172B4D!important;
  --e-global-color-accent:#123A78!important;
  --e-global-color-1:#123A78!important;
  --e-global-color-2:#0F2A56!important;
}
body.kt-app-mode,
body.kt-dashboard-page,
body.kt-kazitasks-auth-page,
body.kt-app-mode .ktapp-shell,
body.kt-app-mode .ktapp-shell * {
  -webkit-tap-highlight-color:rgba(18,58,120,.08)!important;
}

/* Exact 10px field radius across KaziTasks application surfaces. */
body.kt-app-mode input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="file"]),
body.kt-app-mode select,
body.kt-app-mode textarea,
body.kt-dashboard-page input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="file"]),
body.kt-dashboard-page select,
body.kt-dashboard-page textarea,
body.kt-kazitasks-auth-page input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="file"]),
body.kt-kazitasks-auth-page select,
body.kt-kazitasks-auth-page textarea {
  border-radius:10px!important;
}

/* Calm navy focus treatment. */
body.kt-app-mode input:focus,
body.kt-app-mode select:focus,
body.kt-app-mode textarea:focus,
body.kt-dashboard-page input:focus,
body.kt-dashboard-page select:focus,
body.kt-dashboard-page textarea:focus,
body.kt-kazitasks-auth-page input:focus,
body.kt-kazitasks-auth-page select:focus,
body.kt-kazitasks-auth-page textarea:focus {
  border-color:#123A78!important;
  outline:none!important;
  box-shadow:0 0 0 3px rgba(18,58,120,.10)!important;
}
body.kt-app-mode input[type="checkbox"],
body.kt-app-mode input[type="radio"],
body.kt-app-mode input[type="range"],
body.kt-dashboard-page input[type="checkbox"],
body.kt-dashboard-page input[type="radio"],
body.kt-dashboard-page input[type="range"],
body.kt-kazitasks-auth-page input[type="checkbox"],
body.kt-kazitasks-auth-page input[type="radio"],
body.kt-kazitasks-auth-page input[type="range"] {
  accent-color:#123A78!important;
}

/* Elementor-generated buttons inside KaziTasks use NAVY rather than a theme
 * accent. These are not the native KaziTasks component buttons. */
body.kt-app-mode .elementor-button,
body.kt-dashboard-page .elementor-button,
body.kt-kazitasks-auth-page .elementor-button {
  background-color:#123A78!important;
  border-color:#123A78!important;
  color:#fff!important;
}
body.kt-app-mode .elementor-button:hover,
body.kt-app-mode .elementor-button:focus,
body.kt-dashboard-page .elementor-button:hover,
body.kt-dashboard-page .elementor-button:focus,
body.kt-kazitasks-auth-page .elementor-button:hover,
body.kt-kazitasks-auth-page .elementor-button:focus {
  background-color:#0F2A56!important;
  border-color:#0F2A56!important;
  color:#fff!important;
  box-shadow:none!important;
}

/* Do NOT set a generic background on classless buttons. Some core app controls
 * intentionally have no class and are styled by their KaziTasks parent. The old
 * v2.4.89 rule here was what turned Quick Actions and header buttons orange. */
body.kt-app-mode button:not([class]),
body.kt-app-mode input[type="submit"]:not([class]),
body.kt-app-mode input[type="button"]:not([class]),
body.kt-dashboard-page button:not([class]),
body.kt-dashboard-page input[type="submit"]:not([class]),
body.kt-dashboard-page input[type="button"]:not([class]),
body.kt-kazitasks-auth-page button:not([class]),
body.kt-kazitasks-auth-page input[type="submit"]:not([class]),
body.kt-kazitasks-auth-page input[type="button"]:not([class]) {
  background-image:none!important;
}

/* Exact app component states: preserve original light/white surfaces while
 * preventing Hello Elementor hover/focus colours from winning specificity. */
body.kt-app-mode .ktapp-head-actions button,
body.kt-app-mode .ktapp-head-actions button:hover,
body.kt-app-mode .ktapp-head-actions button:focus,
body.kt-app-mode .ktapp-head-actions button:active {
  background:var(--kta-bg)!important;
  background-image:none!important;
  border:0!important;
  color:var(--kta-navy)!important;
  box-shadow:none!important;
  outline:none!important;
}

body.kt-app-mode .ktapp-quick-grid a,
body.kt-app-mode .ktapp-quick-grid a:hover,
body.kt-app-mode .ktapp-quick-grid a:focus,
body.kt-app-mode .ktapp-quick-grid a:active,
body.kt-app-mode .ktapp-quick-grid button,
body.kt-app-mode .ktapp-quick-grid button:hover,
body.kt-app-mode .ktapp-quick-grid button:focus,
body.kt-app-mode .ktapp-quick-grid button:active {
  background:#fff!important;
  background-image:none!important;
  color:var(--kta-navy)!important;
  border-color:var(--kta-border)!important;
  box-shadow:none!important;
  outline:none!important;
}
body.kt-app-mode .ktapp-quick-grid a:hover,
body.kt-app-mode .ktapp-quick-grid a:focus,
body.kt-app-mode .ktapp-quick-grid button:hover,
body.kt-app-mode .ktapp-quick-grid button:focus {
  border-color:rgba(18,58,120,.22)!important;
  box-shadow:0 5px 14px rgba(18,58,120,.05)!important;
}
body.kt-app-mode .ktapp-quick-grid i {
  color:var(--kta-orange)!important;
}

body.kt-app-mode .ktapp-mode-toggle button,
body.kt-app-mode .ktapp-mode-toggle button:hover,
body.kt-app-mode .ktapp-mode-toggle button:focus,
body.kt-app-mode .ktapp-mode-toggle button:active {
  background:transparent!important;
  background-image:none!important;
  color:var(--kta-muted)!important;
  border:0!important;
  box-shadow:none!important;
  outline:none!important;
}
body.kt-app-mode .ktapp-mode-toggle button.active,
body.kt-app-mode .ktapp-mode-toggle button.active:hover,
body.kt-app-mode .ktapp-mode-toggle button.active:focus,
body.kt-app-mode .ktapp-mode-toggle button.active:active {
  background:var(--kta-navy)!important;
  color:#fff!important;
  box-shadow:0 4px 12px rgba(18,58,120,.16)!important;
}

body.kt-app-mode .ktapp-menu-list a:hover,
body.kt-app-mode .ktapp-menu-list a:focus,
body.kt-app-mode .ktapp-menu-list button:hover,
body.kt-app-mode .ktapp-menu-list button:focus,
body.kt-app-mode .ktapp-settings-card a:hover,
body.kt-app-mode .ktapp-settings-card a:focus,
body.kt-app-mode .ktapp-settings-card button:hover,
body.kt-app-mode .ktapp-settings-card button:focus,
body.kt-app-mode .ktapp-detail-menu-row:hover,
body.kt-app-mode .ktapp-detail-menu-row:focus {
  background:var(--kta-bg)!important;
  background-image:none!important;
  color:var(--kta-text)!important;
  box-shadow:none!important;
  outline:none!important;
}

/* Keep text-only KaziTasks accents orange, without painting their containers. */
body.kt-app-mode .ktapp-section-title a,
body.kt-app-mode .ktapp-section-title a:hover,
body.kt-app-mode .ktapp-section-title a:focus,
body.kt-app-mode .ktapp-section-title button,
body.kt-app-mode .ktapp-section-title button:hover,
body.kt-app-mode .ktapp-section-title button:focus,
body.kt-app-mode .ktapp-panel-heading a,
body.kt-app-mode .ktapp-panel-heading a:hover,
body.kt-app-mode .ktapp-panel-heading a:focus,
body.kt-app-mode .ktapp-simple-card a,
body.kt-app-mode .ktapp-simple-card a:hover,
body.kt-app-mode .ktapp-simple-card a:focus {
  background:transparent!important;
  color:var(--kta-orange)!important;
  box-shadow:none!important;
}

/* Back button keeps the approved white base and restrained orange interactive
 * accent. */
body.kt-app-mode .ktapp-back-btn {
  background:#fff!important;
  color:var(--kta-navy)!important;
  border-color:var(--kta-border)!important;
}
body.kt-app-mode .ktapp-back-btn:hover,
body.kt-app-mode .ktapp-back-btn:focus,
body.kt-app-mode .ktapp-back-btn:active {
  background:#fff!important;
  color:var(--kta-orange)!important;
  border-color:var(--kta-orange)!important;
  box-shadow:0 3px 10px rgba(15,42,86,.05)!important;
}

/* KaziTasks bottom navigation retains its own intentional orange active state
 * and navy KaziMatch button. */
body.kt-app-mode .ktapp-bottom button:not(.ktapp-center),
body.kt-app-mode .ktapp-bottom button:not(.ktapp-center):hover,
body.kt-app-mode .ktapp-bottom button:not(.ktapp-center):focus,
body.kt-app-mode .ktapp-bottom button:not(.ktapp-center):active {
  background:transparent!important;
  background-image:none!important;
  color:var(--kta-muted)!important;
  box-shadow:none!important;
  outline:none!important;
}
body.kt-app-mode .ktapp-bottom button:not(.ktapp-center).active,
body.kt-app-mode .ktapp-bottom button:not(.ktapp-center).active:hover,
body.kt-app-mode .ktapp-bottom button:not(.ktapp-center).active:focus,
body.kt-app-mode .ktapp-bottom button:not(.ktapp-center).active:active {
  color:var(--kta-orange)!important;
}
body.kt-app-mode .ktapp-bottom .ktapp-center-match,
body.kt-app-mode .ktapp-bottom .ktapp-center-match:hover,
body.kt-app-mode .ktapp-bottom .ktapp-center-match:focus,
body.kt-app-mode .ktapp-bottom .ktapp-center-match:active {
  background:linear-gradient(135deg,var(--kta-navy),#295ca9)!important;
  color:#fff!important;
}

/* Unclassed links should never inherit a site-kit pink hover. Keep their normal
 * KaziTasks/navy treatment unless a more specific app component rule above
 * intentionally makes them orange. */
body.kt-app-mode a:not([class]),
body.kt-dashboard-page a:not([class]),
body.kt-kazitasks-auth-page a:not([class]),
body.kt-app-mode a:not([class]):hover,
body.kt-dashboard-page a:not([class]):hover,
body.kt-kazitasks-auth-page a:not([class]):hover,
body.kt-app-mode a:not([class]):focus,
body.kt-dashboard-page a:not([class]):focus,
body.kt-kazitasks-auth-page a:not([class]):focus {
  color:#123A78!important;
}

body.kt-app-mode *:focus-visible,
body.kt-dashboard-page *:focus-visible,
body.kt-kazitasks-auth-page *:focus-visible {
  outline-color:#123A78!important;
}
body.kt-app-mode ::selection,
body.kt-dashboard-page ::selection,
body.kt-kazitasks-auth-page ::selection {
  background:#123A78;
  color:#fff;
}
