/* checklist.css — Voter Readiness Certificate / Checklist page */

/* --- Gazette Document Container --- */
.checklist-page {
  max-width: 860px;
  margin: var(--space-xl) auto var(--space-2xl);
  padding: 0 var(--space-xl);
}

/* Official gazette document wrapper */
.gazette-document {
  background: var(--khadi);
  border: 3px double var(--sepia);
  border-radius: var(--radius-sm);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  background-image: repeating-linear-gradient(
    transparent, transparent 31px,
    rgba(123, 94, 58, 0.05) 32px
  );
}

/* Outer stamp border decoration */
.gazette-document::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--sepia-light);
  border-radius: var(--radius-sm);
  pointer-events: none;
}

/* --- Gazette Header --- */
.gazette-header {
  text-align: center;
  border-bottom: 2px solid var(--sepia);
  padding-bottom: var(--space-xl);
  margin-bottom: var(--space-xl);
  position: relative;
}

.gazette-seal {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px dashed var(--sepia);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
  background: rgba(245,236,215,0.8);
  position: relative;
}

.gazette-seal::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid var(--sepia-light);
}

.gazette-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900;
  color: var(--navy);
  margin-bottom: var(--space-xs);
  letter-spacing: -0.01em;
}

.gazette-subtitle {
  font-family: var(--font-stamp);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sepia);
  margin-bottom: var(--space-sm);
}

.gazette-date {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ash);
}

/* Tricolor bar under header */
.gazette-tricolor {
  height: 4px;
  display: flex;
  margin-top: var(--space-md);
}
.gazette-tricolor span {
  flex: 1;
}
.gazette-tricolor span:nth-child(1) { background: var(--saffron); }
.gazette-tricolor span:nth-child(2) { background: rgba(245,236,215,0.5); border: 1px solid var(--sepia-light); }
.gazette-tricolor span:nth-child(3) { background: var(--india-green); }

/* --- Loading state --- */
.checklist-loading {
  text-align: center;
  padding: var(--space-2xl);
}

.checklist-loading p {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--sepia);
  margin-top: var(--space-md);
}

/* --- Phase Section --- */
.phase-section {
  margin-bottom: var(--space-xl);
}

.phase-heading {
  font-family: var(--font-stamp);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sepia);
  border-bottom: 1px dashed var(--sepia-light);
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.phase-heading::before {
  content: '§';
  color: var(--saffron);
  font-size: 1.2rem;
}

/* --- Checklist Items --- */
.checklist-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.checklist-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-md) var(--space-lg);
  border: 1px solid rgba(123,94,58,0.2);
  border-radius: var(--radius-sm);
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.checklist-item.checked {
  background: rgba(45,106,79,0.05);
  border-color: var(--india-green-light);
}

/* Custom checkbox */
.item-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid var(--sepia);
  border-radius: 3px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  margin-top: 2px;
  background: var(--khadi);
  appearance: none;
  -webkit-appearance: none;
}

.item-checkbox:checked {
  background: var(--india-green);
  border-color: var(--india-green);
}

.item-checkbox:checked::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: bold;
  line-height: 1;
}

.item-checkbox:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 2px;
}

.item-content {
  flex: 1;
}

.item-name {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 2px;
  transition: text-decoration var(--transition-fast), color var(--transition-fast);
}

.checklist-item.checked .item-name {
  text-decoration: line-through;
  color: var(--india-green);
}

.item-detail {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ash);
  line-height: 1.5;
  margin: 0;
}

/* Green tick stamp appears when checked */
.item-tick {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.checklist-item.checked .item-tick {
  opacity: 1;
  animation: stampIn 200ms ease-out;
}

/* --- Action Buttons --- */
.checklist-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px dashed var(--sepia-light);
}

/* --- Print styles --- */
@media print {
  .site-header,
  .site-footer,
  .checklist-actions,
  #google_translate_element {
    display: none !important;
  }

  body {
    background: white;
    font-size: 12pt;
  }

  .gazette-document {
    border: 2pt double #7B5E3A;
    box-shadow: none;
    padding: 20pt;
    background: white;
  }

  .checklist-page {
    margin: 0;
    padding: 0;
    max-width: 100%;
  }

  .gazette-document::before {
    border: 1pt dashed #A08060;
  }

  .checklist-item { break-inside: avoid; }
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .checklist-page { padding: 0 var(--space-md); }
  .gazette-document { padding: var(--space-lg); }
  .gazette-document::before { inset: 4px; }
  .checklist-actions { flex-direction: column; align-items: center; }
}
