/**
 * File: assets/css/wcag_contrast_shield.css
 * Universal WCAG 2.1 AA/AAA Contrast Shield — Ticketing IT SanMedika
 * Guarantees zero contrast violations across all interactive elements and dark glass surfaces.
 */

:root {
  --primary-btn-bg: #0369a1;
  --primary-btn-hover: #075985;
  --primary-bright: #38bdf8;
  --green-btn-bg: #15803d;
  --green-btn-hover: #166534;
  --red-text-bright: #f87171;
  --teal-bright: #2dd4bf;
  --purple-bright: #c084fc;
}

/* 1. Breadcrumb Active Item */
.breadcrumb .cur,
span.cur {
  color: #38bdf8 !important;
  font-weight: 600 !important;
}

/* 2. Primary & Info Buttons (Contrast with White: 5.7:1 >= 4.5:1) */
.btn-primary,
button.btn-primary,
a.btn-primary,
.btn-info,
button.btn-info,
a.btn-info {
  background-color: #0369a1 !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

.btn-primary:hover,
button.btn-primary:hover,
a.btn-primary:hover,
.btn-info:hover,
button.btn-info:hover,
a.btn-info:hover {
  background-color: #075985 !important;
  color: #ffffff !important;
  border-color: #0369a1 !important;
}

/* 3. Success Buttons (Contrast with White: 4.88:1 >= 4.5:1) */
.btn-success,
button.btn-success,
a.btn-success {
  background-color: #15803d !important;
  color: #ffffff !important;
  border-color: #166534 !important;
}

.btn-success:hover,
button.btn-success:hover,
a.btn-success:hover {
  background-color: #166534 !important;
  color: #ffffff !important;
}

/* 3b. Danger Buttons (Contrast with White: 6.22:1 >= 4.5:1) */
.btn-danger,
button.btn-danger,
a.btn-danger {
  background-color: #b91c1c !important;
  color: #ffffff !important;
  border-color: #991b1b !important;
}

.btn-danger:hover,
button.btn-danger:hover,
a.btn-danger:hover {
  background-color: #991b1b !important;
  color: #ffffff !important;
}

/* 4. Filter Pills & Count Badges inside Primary Buttons */
.btn-primary span,
.btn.btn-primary span,
a.btn.btn-primary span {
  background-color: rgba(0, 0, 0, 0.45) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

/* 5. Required Field Asterisks */
.req,
span.req {
  color: #f87171 !important;
  font-weight: 700 !important;
}

/* 6. Standard Links on Dark Backgrounds */
a:not(.btn):not(.nav-item a):not(.fs-about-btn):not(.dropdown-item):not(.page-link):not(.navbar-brand) {
  color: #38bdf8;
}

a:not(.btn):not(.nav-item a):not(.fs-about-btn):not(.dropdown-item):not(.page-link):not(.navbar-brand):hover {
  color: #7dd3fc;
}

/* 7. Active Tabs */
.tab-btn.active,
button.tab-btn.active {
  color: #38bdf8 !important;
  border-bottom-color: #38bdf8 !important;
  font-weight: 700 !important;
}

/* 8. Report & Print Outlined Buttons */
button#btn-cetak,
button.btn-default[style*="0f766e"],
button[style*="0f766e"],
a[style*="0f766e"] {
  color: #2dd4bf !important;
  border-color: #2dd4bf !important;
}

button.btn-default[style*="6d28d9"],
button[style*="6d28d9"],
a[style*="6d28d9"] {
  color: #c084fc !important;
  border-color: #c084fc !important;
}

/* 9. SLA & Red Metrics Text */
td[style*="var(--red)"],
td[style*="red"],
span[style*="var(--red)"] {
  color: #f87171 !important;
  font-weight: 600 !important;
}

/* 10. Status & Priority Badges */
.st-menunggu  { background: rgba(251, 191, 36, 0.18) !important; color: #facc15 !important; }
.st-diproses  { background: rgba(59, 130, 246, 0.18) !important; color: #60a5fa !important; }
.st-selesai   { background: rgba(16, 185, 129, 0.18) !important; color: #34d399 !important; }
.st-ditolak   { background: rgba(239, 68, 68, 0.18) !important; color: #f87171 !important; }
.st-tidakbisa { background: rgba(139, 92, 246, 0.18) !important; color: #c084fc !important; }

.pr-tinggi { background: rgba(239, 68, 68, 0.18) !important; color: #f87171 !important; }
.pr-sedang { background: rgba(245, 158, 11, 0.18) !important; color: #fb923c !important; }
.pr-rendah { background: rgba(16, 185, 129, 0.18) !important; color: #34d399 !important; }

/* 11. Overdue & Urgent Badges */
.badge-overdue,
.badge-danger {
  background-color: #b91c1c !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* 12. Select2 WCAG Contrast & Modal Safe Stacking */
.select2-container .select2-selection--single {
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
}
.select2-dropdown {
  background-color: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #f1f5f9 !important;
  z-index: 99999 !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  background-color: #1e293b !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
}
.select2-container--default .select2-results__option {
  color: #f1f5f9 !important;
  padding: 8px 12px !important;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #0284c7 !important;
  color: #ffffff !important;
}
.select2-container--default .select2-results__option[aria-selected="true"] {
  background-color: #0369a1 !important;
  color: #ffffff !important;
}

/* ══════════════════════════════════════════════════════════════════
   13. UNIVERSAL MODAL DARK GLASSMORPHISM ENFORCEMENT
   Guarantees zero white-on-white text violations across all modals
   ══════════════════════════════════════════════════════════════════ */
.modal-ov > div,
.modal-box,
.apm-box {
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #f8fafc !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7) !important;
}

/* Modal Headers */
.modal-ov > div > div:first-child,
.modal-hd,
.apm-head {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Modal Footers & Action Bars */
.modal-ov form > div:last-child,
.modal-ov > div > div:last-child,
.modal-ft,
.apm-foot {
  background: rgba(11, 15, 25, 0.8) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Form Labels & Required Indicators */
.f-label,
label.f-label,
.modal-ov label {
  color: #e2e8f0 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  display: block !important;
  margin-bottom: 4px !important;
}

/* Form Inputs inside Modal */
.f-inp,
input.f-inp,
select.f-inp,
textarea.f-inp,
.modal-ov input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.modal-ov select,
.modal-ov textarea {
  background: rgba(15, 23, 42, 0.7) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 6px !important;
}

.f-inp:focus,
.modal-ov input:focus,
.modal-ov select:focus,
.modal-ov textarea:focus {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2) !important;
  outline: none !important;
}

/* Cancel / Secondary buttons inside modals */
.modal-ov button[onclick*="closeModal"],
.modal-ov button[onclick*="tutupModal"],
.modal-ov button.btn-secondary,
.modal-ov button.btn-light,
.modal-ov button[style*="background:#f1f5f9"],
.modal-ov button[style*="background: #f1f5f9"] {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #e2e8f0 !important;
}

.modal-ov button[onclick*="closeModal"]:hover,
.modal-ov button[onclick*="tutupModal"]:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

/* Form section dividers & hints */
.f-section {
  color: #4ade80 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Modal text color overrides */
.modal-ov [style*="color:#1e293b"],
.modal-ov [style*="color: #1e293b"],
.modal-ov strong {
  color: #f8fafc !important;
}
.modal-ov [style*="color:#64748b"],
.modal-ov [style*="color: #64748b"],
.modal-ov [style*="color:#374151"],
.modal-ov [style*="color: #374151"] {
  color: #94a3b8 !important;
}

/* Asset Picker Modal (buat_tiket.php) */
.apm-search-area {
  background: rgba(15, 23, 42, 0.9) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.apm-search-wrap {
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}
.apm-search-inp {
  background: transparent !important;
  color: #ffffff !important;
}
.apm-chip {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}
.apm-chip:hover {
  background: rgba(38, 185, 154, 0.2) !important;
  color: #34d399 !important;
}
.apm-chip.active {
  background: #26B99A !important;
  color: #ffffff !important;
}
.apm-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.apm-item:hover {
  background: rgba(38, 185, 154, 0.12) !important;
}
.apm-item.selected {
  background: rgba(38, 185, 154, 0.25) !important;
}
.apm-item-nama {
  color: #f8fafc !important;
}
.apm-state-title {
  color: #cbd5e1 !important;
}

