/* --- Schemes Catalog Directory Styles --- */
.directory-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.filter-sidebar {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.05);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.filter-group {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--neutral-light);
}

.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-group h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  font-family: 'Outfit', sans-serif;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--neutral-dark);
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--neutral-border);
  accent-color: var(--primary-navy);
  cursor: pointer;
}

.search-bar-container {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.75rem;
  border: 1px solid var(--neutral-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.search-icon-svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-muted);
  pointer-events: none;
}

.scheme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.scheme-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.scheme-card-tag {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  background-color: var(--neutral-light);
  color: var(--primary-navy);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  width: fit-content;
}

.scheme-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.scheme-card p {
  font-size: 0.9rem;
  color: var(--neutral-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.scheme-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--neutral-light);
  gap: 0.5rem;
}

/* --- Eligibility Wizard Styles --- */
.wizard-container {
  max-width: 700px;
  margin: 0 auto;
}

.progress-bar-wrapper {
  background-color: var(--neutral-border);
  height: 8px;
  border-radius: 4px;
  margin-bottom: 2.5rem;
  overflow: hidden;
}

.progress-bar-fill {
  background: linear-gradient(to right, var(--primary-navy), var(--primary-navy-light));
  height: 100%;
  width: 0;
  transition: var(--transition-smooth);
}

.step-card {
  display: none;
}

.step-card.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

.question-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.option-card {
  border: 2px solid var(--neutral-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.option-card:hover {
  border-color: var(--primary-navy);
  background-color: rgba(30, 53, 82, 0.04);
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.option-card.selected {
  border-color: var(--primary-navy);
  background-color: rgba(30, 53, 82, 0.08);
}

.option-card.selected h4 {
  color: var(--primary-navy);
}

.form-group-wizard {
  margin-bottom: 2rem;
}

.form-group-wizard label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.form-input-wizard {
  width: 100%;
  padding: 0.85rem;
  border: 2px solid var(--neutral-border);
  border-radius: var(--radius-md);
  font-size: 1.1rem;
  transition: var(--transition-smooth);
}

.form-input-wizard:focus {
  border-color: var(--primary-navy);
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

/* --- Eligibility Results Display --- */
.result-header-card {
  text-align: center;
  padding: 2.5rem;
  margin-bottom: 2rem;
  border-top: 6px solid var(--primary-navy);
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-item {
  border-left: 6px solid var(--neutral-border);
}

.result-item.eligible {
  border-left-color: var(--success-teal);  /* Turmeric */
  background-color: var(--success-teal-light);
}

.result-item.maybe {
  border-left-color: var(--neutral-border);  /* Sage */
  background-color: var(--paper-dark);
}

.result-item.not-eligible {
  border-left-color: var(--accent-saffron);  /* Soil */
  background-color: rgba(168, 69, 46, 0.09);
}

.result-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.result-badge.eligible {
  background-color: var(--success-teal);  /* Turmeric */
  color: #1B2624;  /* Ink Charcoal — dark enough for contrast on Turmeric */
}

.result-badge.maybe {
  background-color: var(--neutral-light);  /* Limestone */
  color: var(--neutral-dark);
  border: 1px solid var(--neutral-border);
}

.result-badge.not-eligible {
  background-color: var(--accent-saffron);  /* Sandstone Red */
  color: #FFFFFF;
}

.result-reasons {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--neutral-muted);
  border-top: 1px solid rgba(0,0,0,0.05);
  padding-top: 0.75rem;
}

/* --- Comparison Matrix Styles --- */
.compare-matrix-wrapper {
  overflow-x: auto;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0,0,0,0.05);
  margin-top: 2rem;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 700px;
}

.compare-table th, 
.compare-table td {
  padding: 1.5rem;
  border-bottom: 1px solid var(--neutral-light);
  vertical-align: top;
}

.compare-table th {
  background-color: var(--primary-navy);
  color: #FFFFFF;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

.compare-table th:first-child {
  border-top-left-radius: var(--radius-lg);
}

.compare-table th:last-child {
  border-top-right-radius: var(--radius-lg);
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-feature-name {
  font-weight: 700;
  color: var(--primary-navy);
  background-color: var(--neutral-light);
  width: 220px;
}

.compare-diff-highlight {
  background-color: rgba(30, 53, 82, 0.04);  /* Indigo 4% */
  font-weight: 500;
}

.compare-diff-badge {
  display: inline-block;
  font-size: 0.75rem;
  background-color: rgba(201, 151, 62, 0.15);  /* Turmeric 15% */
  color: var(--success-teal-dark);  /* Turmeric dark text */
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Compare floating widget */
.compare-tray {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--primary-navy);
  color: #FFFFFF;
  padding: 1rem 0;
  box-shadow: 0 -10px 25px rgba(0,0,0,0.15);
  z-index: 99;
  transform: translateY(100%);
  transition: var(--transition-smooth);
}

.compare-tray.active {
  transform: translateY(0);
}

.compare-tray-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.compare-tray-items {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.compare-tray-chip {
  background-color: rgba(255,255,255,0.1);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.compare-tray-chip button {
  background: none;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  font-weight: 700;
}

/* --- Grievance Status Timeline --- */
.timeline-container {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 3rem 0;
  padding: 0 1rem;
}

.timeline-line {
  position: absolute;
  top: 24px;
  left: 5%;
  right: 5%;
  height: 4px;
  background-color: var(--neutral-border);
  z-index: 1;
}

.timeline-line-progress {
  position: absolute;
  top: 24px;
  left: 5%;
  height: 4px;
  background-color: var(--success-teal);
  z-index: 2;
  width: 0%;
  transition: var(--transition-smooth);
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 3;
  width: 18%;
  cursor: pointer;
}

.timeline-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #FFFFFF;
  border: 3px solid var(--neutral-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--neutral-muted);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.timeline-step.completed .timeline-icon {
  background-color: var(--success-teal-light);  /* Turmeric tint */
  border-color: var(--success-teal);  /* Turmeric border */
  color: var(--success-teal-dark);   /* Turmeric dark text */
}

.timeline-step.active .timeline-icon {
  background-color: var(--accent-saffron);  /* Soil — CTA-level action */
  border-color: var(--accent-saffron);
  color: #FFFFFF;
  box-shadow: 0 0 0 6px rgba(168, 69, 46, 0.18);  /* Soil halo */
}

.timeline-step-label {
  margin-top: 0.75rem;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  color: var(--neutral-muted);
  font-family: 'Outfit', sans-serif;
  transition: var(--transition-smooth);
}

.timeline-step.active .timeline-step-label,
.timeline-step.completed .timeline-step-label {
  color: var(--primary-navy);
}

.timeline-detail-box {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-top: 2rem;
  border: 1px solid rgba(0,0,0,0.05);
  animation: fadeIn 0.3s ease-out;
}

.timeline-detail-box h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

/* Escalation Panel */
.escalation-panel {
  /* Warm stone — Limestone with a turmeric cast, distinct from page bg */
  background: linear-gradient(135deg, #F5F0E8, #EDE4D0);
  border: 1px solid rgba(201, 151, 62, 0.4);  /* Turmeric border */
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.escalation-badge {
  background-color: var(--success-teal);  /* Turmeric fill */
  color: #1B2624;  /* Ink Charcoal — passes contrast on turmeric */
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 1rem;
}

.escalation-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.contact-card-sub {
  background: rgba(255, 255, 255, 0.65);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(124, 143, 130, 0.25);  /* Sage border */
}

.contact-card-sub h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.contact-card-sub p {
  font-size: 0.85rem;
  color: var(--neutral-muted);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Styling for Timeline & Catalog */
@media (max-width: 768px) {
  .directory-layout {
    grid-template-columns: 1fr;
  }
  
  .filter-sidebar {
    position: static;
    margin-bottom: 1.5rem;
  }
  
  .timeline-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding-left: 2rem;
    margin: 2rem 0;
  }
  
  .timeline-line {
    top: 0;
    bottom: 0;
    left: 44px;
    width: 4px;
    height: 90%;
  }
  
  .timeline-line-progress {
    top: 0;
    left: 44px;
    width: 4px;
  }
  
  .timeline-step {
    flex-direction: row;
    width: 100%;
    gap: 1rem;
    justify-content: flex-start;
  }
  
  .timeline-step-label {
    margin-top: 0;
    text-align: left;
  }
}
