/* ============================================================
   PTC Admission System — Tailwind supplemental styles
   Only handles things Tailwind utility classes cannot do.
   ============================================================ */

/* ── Custom scrollbar for privacy box ─────────────────────── */
.privacy-box {
  max-height: 160px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2e8b57 #e8f5ee;
}

.privacy-box::-webkit-scrollbar {
  width: 6px;
}

.privacy-box::-webkit-scrollbar-track {
  background: #e8f5ee;
  border-radius: 3px;
}

.privacy-box::-webkit-scrollbar-thumb {
  background: #2e8b57;
  border-radius: 3px;
}

/* ── Stepper connector line ────────────────────────────────── */
.step-line {
  flex: 1;
  height: 2px;
  background: #d1d5db;
  min-width: 8px;
  transition: background 0.3s;
}

.step-line.done {
  background: #1a6b3c;
}

/* ── Slot card :has(input:checked) ────────────────────────── */
.slot-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  background: #fff;
}

.slot-card:hover {
  border-color: #2e8b57;
}

.slot-card:has(input:checked) {
  border-color: #1a6b3c;
  background: #e8f5ee;
  box-shadow: 0 0 0 3px rgba(26, 107, 60, 0.15);
}

.slot-card input[type="radio"] {
  accent-color: #1a6b3c;
}

.slot-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slot-info strong {
  font-size: .9rem;
  color: #111827;
}

.slot-info span {
  font-size: .82rem;
  color: #4b5563;
}

.slot-info small {
  font-size: .75rem;
  color: #6b7280;
}

/* ── Details-list grid ─────────────────────────────────────── */
.details-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  margin: 0;
}

.details-list dt {
  font-size: .78rem;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
}

.details-list dd {
  font-size: .85rem;
  color: #111827;
  margin: 0;
  word-break: break-word;
}

/* ── Mobile table responsive (data-label pseudo-elements) ──── */
@media (max-width: 639px) {
  .mobile-table thead {
    display: none;
  }

  .mobile-table tbody tr {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
  }

  .mobile-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.5rem;
    border: none;
    font-size: .82rem;
  }

  .mobile-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #6b7280;
    font-size: .75rem;
    margin-right: 0.5rem;
    white-space: nowrap;
  }
}

/* ── Print styles for certificate ─────────────────────────── */
@media print {
  .no-print {
    display: none !important;
  }

  body {
    background: #fff !important;
  }

  .cert-preview {
    border: 3px double #1a6b3c !important;
    box-shadow: none !important;
    margin: 0 !important;
  }
}

/* ── Sidebar overlay (mobile) ──────────────────────────────── */
#sidebarOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 39;
}

#sidebarOverlay.show {
  display: block;
}

/* ── Sidebar mobile open state ─────────────────────────────── */
@media (max-width: 1023px) {
  #adminSidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  #adminSidebar.open {
    transform: translateX(0);
  }
}

/* ── Certificate preview ───────────────────────────────────── */
.cert-preview {
  background: #fff;
  border: 3px double #1a6b3c;
  border-radius: 4px;
  padding: 2.5rem;
  font-family: Georgia, 'Times New Roman', serif;
}

.cert-preview h2 {
  text-align: center;
  font-size: 1.3rem;
  color: #1a6b3c;
  font-weight: 700;
  letter-spacing: .05em;
  margin-bottom: .25rem;
}

.cert-preview .cert-sub {
  text-align: center;
  font-size: .85rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.cert-preview .cert-body {
  font-size: .95rem;
  line-height: 1.8;
  color: #1f2937;
  text-align: justify;
  margin: 1.5rem 0;
}

.cert-preview .cert-sig {
  text-align: center;
  margin-top: 2rem;
  font-size: .9rem;
  color: #1f2937;
}

/* ── Landing page animations ───────────────────────────────── */
@keyframes fadeUp {
  0%   { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

.animate-fade-up {
  animation: fadeUp 0.7s ease both;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease both;
}

/* ── Scroll reveal ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Value card hover ──────────────────────────────────────── */
.value-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26, 107, 60, 0.15);
}

/* ── Section divider ───────────────────────────────────────── */
.section-divider {
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, #1a6b3c, #2e8b57);
  border-radius: 2px;
  margin: 0 auto 1.5rem;
}
