/* ==========================================================================
   Equipment Statutory Certification & Compliance Matrix Stylesheet
   High-Contrast Industrial Dark-Mode Theme
   ========================================================================== */

/* --------------------------------------------------------------------------
   Compliance Status Pills & Badges
   -------------------------------------------------------------------------- */
.pill-compliant {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  border-radius: 9999px;
  background-color: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.15);
  transition: all 0.15s ease-in-out;
}

.pill-expiring {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  border-radius: 9999px;
  background-color: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
  animation: glow-amber 2.5s ease-in-out infinite;
  transition: all 0.15s ease-in-out;
}

.pill-expired {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.6875rem;
  font-weight: 900;
  letter-spacing: 0.025em;
  border-radius: 9999px;
  background-color: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.5);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
  transition: all 0.15s ease-in-out;
}

.pill-empty {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 9999px;
  background-color: rgba(71, 85, 105, 0.2);
  color: #94a3b8;
  border: 1px solid rgba(71, 85, 105, 0.35);
}

/* Pulsing hazard dot for expired items */
.pulse-hazard-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulse-hazard 1.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-hazard {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.8);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

@keyframes glow-amber {
  0%, 100% {
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.2);
  }
  50% {
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
  }
}

/* --------------------------------------------------------------------------
   Heatmap Matrix Table Cell Styling & Interactions
   -------------------------------------------------------------------------- */
.matrix-cell {
  position: relative;
  text-align: center;
  padding: 0.65rem 0.5rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.matrix-cell:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.matrix-cell.active-cell {
  outline: 2px solid #38bdf8;
  outline-offset: 1px;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.matrix-cell-valid {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.06) 100%);
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.matrix-cell-valid:hover {
  border-color: rgba(52, 211, 153, 0.6);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(5, 150, 105, 0.12) 100%);
}

.matrix-cell-expiring {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16) 0%, rgba(217, 119, 6, 0.08) 100%);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.matrix-cell-expiring:hover {
  border-color: rgba(251, 191, 36, 0.7);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.26) 0%, rgba(217, 119, 6, 0.16) 100%);
}

.matrix-cell-expired {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.18) 0%, rgba(185, 28, 28, 0.1) 100%);
  border: 1px solid rgba(248, 113, 113, 0.4);
}

.matrix-cell-expired:hover {
  border-color: rgba(248, 113, 113, 0.8);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(185, 28, 28, 0.2) 100%);
}

.matrix-cell-empty {
  background: rgba(30, 41, 59, 0.3);
  border: 1px dashed rgba(71, 85, 105, 0.4);
  cursor: default;
}

.matrix-cell-empty:hover {
  transform: none;
  filter: none;
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   Days Remaining Indicators
   -------------------------------------------------------------------------- */
.days-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 0.375rem;
  white-space: nowrap;
}

.days-pill-positive {
  background-color: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.days-pill-warning {
  background-color: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.days-pill-overdue {
  background-color: rgba(239, 68, 68, 0.16);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.4);
}

/* --------------------------------------------------------------------------
   Certifications Ledger Table Enhancements
   -------------------------------------------------------------------------- */
.cert-row-hover {
  transition: background-color 0.15s ease-in-out;
}

.cert-row-hover:hover {
  background-color: rgba(51, 65, 85, 0.55);
}

.cert-mandatory-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 0.25rem;
  background-color: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.cert-optional-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 0.25rem;
  background-color: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* --------------------------------------------------------------------------
   Filter Chips & Active Filter Indicator
   -------------------------------------------------------------------------- */
.filter-chip-active {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 0.5rem;
  background-color: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

/* --------------------------------------------------------------------------
   Circular / Radial Metric Indicator
   -------------------------------------------------------------------------- */
.progress-ring {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.progress-ring__circle {
  stroke-dasharray: 283;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Wide-Screen Fluid Layout Enhancements for Compliance Matrix & Ledger
   -------------------------------------------------------------------------- */
#tableComplianceMatrix,
#tableCertificationsLedger {
  width: 100%;
  min-width: 100%;
}

@media (min-width: 1536px) {
  #tableComplianceMatrix th,
  #tableComplianceMatrix td,
  #tableCertificationsLedger th,
  #tableCertificationsLedger td {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
}

@media (min-width: 1920px) {
  #tableComplianceMatrix th,
  #tableComplianceMatrix td,
  #tableCertificationsLedger th,
  #tableCertificationsLedger td {
    font-size: 0.8125rem;
  }
}
