/* ==========================================================================
   PRECONSTRUCTION DISPUTE RISK ASSESSMENT (PCDRI) - TAILWIND SUPPORT LAYER
   Tailwind CSS Utility Companion & State Bindings
   ========================================================================== */

/* Essential Dynamic View States */
.view-section {
  display: none;
}
.view-section.active {
  display: block;
}

/* Tabs Dynamic State */
.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

/* Modal Dynamic State & Smooth Fade / Scale Animation */
.modal-overlay {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex !important;
}

.modal-overlay.active {
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

.modal-dialog {
  transform: scale(0.95) translateY(-10px);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease-out;
}

.modal-overlay.active .modal-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Factor Card Accordion Expand/Collapse */
.factor-card-body {
  display: none;
}
.factor-card.expanded .factor-card-body {
  display: block;
}
.factor-card.expanded {
  border-color: #93C5FD !important;
  box-shadow: 0 4px 16px -2px rgba(23, 105, 194, 0.12) !important;
}
.factor-chevron {
  transition: transform 0.2s ease;
}
.factor-card.expanded .factor-chevron {
  transform: rotate(90deg);
}

/* Stepper Active & Completed States */
#stepper-fill-bar {
  background-color: #10B981 !important;
}
.step-item.active .step-circle {
  background-color: #1769C2 !important;
  border-color: #1769C2 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(23, 105, 194, 0.3) !important;
  transform: scale(1.08);
}
.step-item.active .step-label {
  color: #1769C2 !important;
  font-weight: 700 !important;
}
.step-item.completed .step-circle {
  background-color: #10B981 !important;
  border-color: #10B981 !important;
  color: #FFFFFF !important;
}
.step-item.completed .step-label {
  color: #10B981 !important;
  font-weight: 600 !important;
}

/* Likert Pill Rating Active State */
.btn-pill-number.active {
  background-color: #1769C2 !important;
  border-color: #1769C2 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(23, 105, 194, 0.35) !important;
  transform: scale(1.05);
}

/* Navigation Link Active States */
.nav-link-btn.active {
  color: #1769C2 !important;
  background-color: #EBF4FC !important;
  font-weight: 700 !important;
}

/* Mobile Bottom Navigation Active State */
.nav-bottom-item.active {
  color: #1769C2 !important;
}
.nav-bottom-item.active svg {
  stroke: #1769C2 !important;
}
.nav-bottom-item.active .nav-bottom-icon-wrap {
  background-color: #EBF4FC !important;
  color: #1769C2 !important;
}

/* Results Tabs Active State */
.results-tab-btn.active {
  color: #1769C2 !important;
  border-color: #1769C2 !important;
  font-weight: 700 !important;
  background-color: #FFFFFF !important;
}

/* Custom Scrollbar for review modal and tables */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Print Styles for Executive Reporting */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  header,
  nav,
  .bottom-nav,
  .assessment-bottom-bar,
  .results-tabs-nav,
  .btn-back,
  .btn-stepper-next,
  .no-print {
    display: none !important;
  }
  main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }
  .view-section:not(#view-results) {
    display: none !important;
  }
  #view-results {
    display: block !important;
  }
  .tab-pane {
    display: block !important;
    margin-bottom: 24px !important;
    page-break-inside: avoid !important;
  }
}
