/* =========================================================
   PRINTOUT SERVICES – SLIDE PANEL
   ========================================================= */

/* ---------- Overlay ---------- */
.print-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1600;
}

/* ---------- Panel ---------- */
.print-panel {
  position: fixed;
  top: 0;
  right: -460px; /* hidden by default */
  width: 460px;
  height: 100%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  transition: right 0.35s ease;
  z-index: 1601;
}

/* 🔑 Open state */
.print-panel.open {
  right: 0;
}

/* =========================================================
   HEADER
   ========================================================= */
.print-header {
  padding: 22px 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.print-header h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #111827;
}

.print-header p {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

.print-close {
  background: #f3f4f6;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.print-close:hover {
  background: #e5e7eb;
}

/* =========================================================
   BODY
   ========================================================= */
.print-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 140px;
}

/* Steps */
.print-step {
  display: none;
}

.print-step.active {
  display: block;
}

/* =========================================================
   DOCUMENT CARD
   ========================================================= */
.print-doc-card {
  margin-top: 20px;
  padding: 16px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.print-doc-card {
  margin-top: 20px;
}

.print-doc-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #1f2937;
}

/* =========================================================
   RADIO / OPTION GROUPS
   ========================================================= */
.print-radio {
  display: flex;
  gap: 14px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.print-radio label {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  cursor: pointer;
  font-weight: 600;
  background: #ffffff;
  transition: all 0.25s ease;
}

.print-radio label:hover {
  border-color: #2563eb;
  background: #f8fafc;
}

.print-radio label:has(input:checked) {
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  border-color: #2563eb;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.15);
}

.print-radio input {
  accent-color: #2563eb;
  margin-right: 6px;
}

/* =========================================================
   BILL SUMMARY
   ========================================================= */
.print-bill {
  background: #f9fafb;
  padding: 18px;
  border-radius: 16px;
  margin-top: 10px;
}

.print-bill div {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 10px;
}

.print-bill hr {
  border-top: 1px dashed #d1d5db;
  margin: 12px 0;
}

.print-bill .total {
  font-weight: 800;
  font-size: 16px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.print-footer {
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 16px 20px;
  display: flex;
  gap: 14px;
  z-index: 10;
}

.print-footer button {
  flex: 1;
  height: 46px;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

/* Back */
.print-footer button:first-child {
  background: #f3f4f6;
  color: #1f2937;
}

/* Primary */
.print-footer button:last-child {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

/* =========================================================
   NOTES
   ========================================================= */
.print-note {
  font-size: 12px;
  color: #92400e;
  background: #fffbeb;
  padding: 10px;
  border-radius: 10px;
  margin-top: 12px;
}

/* =========================================================
   MOBILE REFINEMENTS
   ========================================================= */
/* =========================================
   UNIVERSAL MOBILE PANEL SYSTEM
========================================= */

@media (max-width: 640px){

  .logo-panel,
  .flex-panel,
  .gst-panel,
  .web-panel,
  .ts-panel,
  .company-panel,
  .lam-panel,
  .mc-panel,
  .pan-panel,
  .print-panel,
  .vc-panel,
  .voter-panel {
    width: 100% !important;
    max-width: 100% !important;
    right: -100% !important;
    border-radius: 0 !important;
  }

  .logo-panel.open,
  .flex-panel.open,
  .gst-panel.open,
  .web-panel.open,
  .ts-panel.open,
  .company-panel.open,
  .lam-panel.open,
  .mc-panel.open,
  .pan-panel.open,
  .print-panel.open,
  .vc-panel.open,
  .voter-panel.open {
    right: 0 !important;
  }
  
  .print-radio {
    flex-direction: column;
  }
}

/* =========================================================
   BINDING QUANTITY STYLING
   ========================================================= */

.binding-qty {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px dashed #d1d5db;
}

/* Label */
.binding-qty label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
}

/* Quantity input */
.binding-qty input {
  width: 110px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s ease;
}

/* Focus effect */
.binding-qty input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Error message */
.binding-qty .binding-error {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #dc2626;
  font-weight: 600;
}

/* Hide cleanly */
.binding-qty.hidden {
  display: none;
}

/* Stack inputs nicely inside print card */
.print-doc-card label {
  display: block;
  font-weight: 600;
  margin-top: 14px;
  margin-bottom: 6px;
}

.print-doc-card input[type="file"],
.print-doc-card input[type="number"],
.print-doc-card textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.print-copies {
  max-width: 140px;
  text-align: center;
}

.binding-qty-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  background: #f9fafb;
  max-width: 200px;
}

.binding-qty-box input {
  width: 100%;
}

.page-info {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;
}

.page-info::before {
  content: "📄 ";
}

/* =========================================================
   STEP 1 – CUSTOMER & PRINT DETAILS (MISSING STYLES FIX)
   ========================================================= */

/* Field wrapper spacing */
.print-step label {
  display: block;
  font-weight: 600;
  margin-top: 14px;
  margin-bottom: 6px;
  color: #1f2937;
}

/* Text, email, tel, date, time, select */
.print-step input[type="text"],
.print-step input[type="email"],
.print-step input[type="tel"],
.print-step input[type="date"],
.print-step input[type="time"],
.print-step select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  background: #ffffff;
  transition: all 0.2s ease;
}

/* Focus */
.print-step input:focus,
.print-step select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Select arrow consistency */
.print-step select {
  cursor: pointer;
}

/* =========================================================
   DELIVERY TYPE (SELF / HOME) – MATCH RADIO STYLE
   ========================================================= */

.print-step .print-radio {
  margin-top: 8px;
}

/* =========================================================
   ADDRESS BOX (HOME DELIVERY)
   ========================================================= */

#printAddressBox {
  margin-top: 12px;
}

#printAddressBox textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  resize: vertical;
}

/* =========================================================
   ERROR MESSAGES (CONSISTENT)
   ========================================================= */

.error {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #dc2626;
  font-weight: 600;
}

/* =========================================================
   SPACING FIX – PREVENT EMPTY LOOK
   ========================================================= */

.print-step > *:first-child {
  margin-top: 0;
}
