/* Custom CSS for Arogya Care Clinic */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary-blue: #0284c7;
  --primary-dark: #0369a1;
  --secondary-teal: #0d9488;
  --accent-cyan: #06b6d4;
  --dark-text: #0f172a;
  --light-bg: #f8fafc;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #334155;
  background-color: #f8fafc;
  overflow-x: hidden;
}

/* Glassmorphism Navigation */
.glass-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

/* Hero Gradient */
.hero-gradient {
  background: linear-gradient(135deg, #0f172a 0%, #0369a1 60%, #0d9488 100%);
}

.hero-pattern {
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Custom Card Hover */
.clinic-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.clinic-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Pulse animation for emergency tag */
@keyframes emergency-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

.animate-pulse-slow {
  animation: emergency-pulse 2.5s infinite;
}

/* Modal Transitions */
.modal-overlay {
  transition: opacity 0.25s ease-out;
}

.modal-content {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-hidden .modal-content {
  transform: scale(0.95) translateY(20px);
}

.modal-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal-visible .modal-content {
  transform: scale(1) translateY(0);
}

/* Cascading dropdown state styles */
select:disabled {
  background-color: #f1f5f9;
  cursor: not-allowed;
  opacity: 0.65;
  border-color: #cbd5e1;
}

/* Step badges */
.step-badge {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.875rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ============================================================
   OFFICIAL OPD PRINT RECEIPT & PDF STYLING
   ============================================================ */
.print-slip-wrapper {
  background: #ffffff;
  color: #1e293b;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

.print-slip-card {
  max-width: 800px;
  margin: 0 auto;
  background: #ffffff;
  border: 2px solid #0f172a;
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.print-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  border-bottom: 2px solid #0284c7;
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.print-header-brand h2 {
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 4px 0;
}

.print-header-brand .tagline {
  font-size: 11px;
  font-weight: 600;
  color: #0284c7;
  margin: 0 0 6px 0;
}

.print-header-brand .meta {
  font-size: 10px;
  color: #475569;
  line-height: 1.4;
  margin: 0;
}

.print-token-badge {
  text-align: right;
  flex-shrink: 0;
  background: #f0fdf4;
  border: 1.5px solid #16a34a;
  border-radius: 8px;
  padding: 8px 14px;
}

.print-token-badge .label {
  font-size: 9px;
  font-weight: 800;
  color: #15803d;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
}

.print-token-badge .token {
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
  font-family: monospace;
  display: block;
  margin: 2px 0;
}

.print-token-badge .status {
  font-size: 9px;
  font-weight: 700;
  color: #ffffff;
  background: #16a34a;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
}

.print-title-strip {
  background: #0f172a;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.print-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.print-box {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
}

.print-box-header {
  background: #f8fafc;
  color: #0f172a;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-bottom: 1px solid #cbd5e1;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.print-table td {
  padding: 6px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

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

.print-table td.td-label {
  color: #64748b;
  font-weight: 600;
  width: 38%;
}

.print-table td.td-val {
  color: #0f172a;
  font-weight: 700;
}

.print-fee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.print-fee-table th {
  background: #f8fafc;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 7px 12px;
  border-bottom: 1px solid #cbd5e1;
  text-align: left;
}

.print-fee-table td {
  padding: 7px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}

.print-fee-table tfoot th {
  background: #f8fafc;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  color: #0f172a;
  border-top: 1.5px solid #cbd5e1;
}

.print-instructions {
  background: #f8fafc;
  border-left: 3px solid #0284c7;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 18px;
}

.print-instructions h5 {
  font-size: 10px;
  font-weight: 800;
  color: #0369a1;
  text-transform: uppercase;
  margin: 0 0 4px 0;
}

.print-instructions ul {
  margin: 0;
  padding-left: 16px;
  font-size: 10px;
  color: #475569;
  line-height: 1.5;
}

.print-signatures {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 14px;
  margin-top: 10px;
  border-top: 1px dashed #cbd5e1;
}

.print-sig-col {
  text-align: center;
  width: 180px;
}

.print-sig-line {
  border-bottom: 1px solid #94a3b8;
  height: 35px;
  margin-bottom: 4px;
}

.print-sig-col p {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  margin: 0;
  text-transform: uppercase;
}

.print-footer-note {
  text-align: center;
  font-size: 9px;
  color: #94a3b8;
  margin-top: 14px;
}

/* Hidden by default on screen */
.print-only-area {
  display: none;
}

/* ============================================================
   ROBUST @MEDIA PRINT RULES (No Cutoffs, Clean Single A4 Page)
   ============================================================ */
@media print {
  @page {
    size: A4 portrait;
    margin: 8mm 10mm 8mm 10mm;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  /* Hide entire page structure during print */
  body > *:not(#printReceiptArea) {
    display: none !important;
  }

  #bookingModal {
    display: none !important;
  }

  /* Show ONLY dedicated print receipt area */
  #printReceiptArea {
    display: block !important;
    visibility: visible !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  #printReceiptArea * {
    visibility: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .print-slip-card {
    border: 1.5px solid #000000 !important;
    box-shadow: none !important;
    padding: 16px 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 4px !important;
  }

  .no-print {
    display: none !important;
  }
}
