/* Background Override - Ensures light blue gradient on all pages */
body,
body.fixed-nav,
body.sticky-footer {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%) !important;
  background-attachment: fixed !important;
  min-height: 100vh !important;
}

/* Override any inline styles on specific pages */
body[style] {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%) !important;
  background-attachment: fixed !important;
}

/* Ensure content areas have proper contrast */
.content-wrapper,
.container-fluid {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  margin: 10px;
  padding: 20px;
}

/* Cards and forms */
.card,
.form-control,
.custom-select {
  background-color: rgba(255, 255, 255, 0.98);
}

/* Tables */
.table {
  background-color: rgba(255, 255, 255, 0.98);
}

/* Modals - Must have solid backgrounds to prevent darkening */
.modal-content {
  background-color: #ffffff !important;
  opacity: 1 !important;
}

/* Visitor detail modal specific fix - AGGRESSIVE FIX FOR DARKENING */
.visitor-detail-modal {
  isolation: isolate !important;
  z-index: 10050 !important;
}

.visitor-detail-modal .modal-dialog {
  position: relative !important;
  z-index: 10051 !important;
}

.visitor-detail-modal .modal-content,
.visitor-detail-modal .modern-modal-content {
  position: relative !important;
  z-index: 10052 !important;
  background-color: #ffffff !important;
  background: #ffffff !important;
  opacity: 1 !important;
  isolation: isolate !important;
}

.visitor-detail-modal .modal-header {
  opacity: 1 !important;
  position: relative !important;
  z-index: 1 !important;
}

.visitor-detail-modal .modal-body,
.visitor-detail-modal .modern-modal-body {
  background-color: #ffffff !important;
  background: #ffffff !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 1 !important;
}

.visitor-detail-modal .modal-footer,
.visitor-detail-modal .modern-modal-footer {
  background-color: #f8f9fa !important;
  background: #f8f9fa !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Force all child elements to be opaque */
.visitor-detail-modal * {
  opacity: 1 !important;
}

/* Ensure modal body containers don't inherit transparency */
.modal-body .container-fluid,
.modal-content .container-fluid {
  background-color: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Override any inherited dark overlays */
body.modal-open .visitor-detail-modal {
  background: transparent !important;
}

/* Ensure the modal backdrop for visitor detail is properly positioned */
.modal-backdrop {
  z-index: 10040 !important;
}

.visitor-detail-modal.show {
  z-index: 10050 !important;
}

/* Navigation adjustments */
.navbar {
  background-color: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Dropdown menus */
.dropdown-menu {
  background-color: rgba(255, 255, 255, 0.98);
}

/* GLOBAL MODAL FIX - Ensure all modals appear above scanner overlays */
.modal {
  z-index: 10050 !important;
}

.modal.fade .modal-dialog {
  z-index: 10051 !important;
}

.modal .modal-content {
  z-index: 10052 !important;
  background-color: #ffffff !important;
}

/* Ensure all modal backdrops are properly positioned */
.modal-backdrop.show {
  z-index: 10040 !important;
}
