/* =========================================================
   VISITING CARD – OVERRIDE (scoped to #vc-isolated)
   Design system: matches pan-wizard light theme tokens
   All selectors scoped → zero bleed onto rest of page
   ========================================================= */

/* ── CSS Token overrides (light theme, pan-wizard parity) ── */
#vc-isolated,
#vc-isolated * {
  --bg-deep:       #f1f5f9;
  --bg-card:       #ffffff;
  --bg-card-hover: #e8f0fe;
  --border:        rgba(37, 99, 235, 0.14);
  --border-hover:  rgba(37, 99, 235, 0.35);
  --violet:        #2563eb;
  --violet-soft:   rgba(37, 99, 235, 0.08);
  --cyan:          #0ea5e9;
  --cyan-soft:     rgba(14, 165, 233, 0.10);
  --text-primary:  #0f172a;
  --text-muted:    #64748b;
  --glow-violet:   0 0 18px rgba(37, 99, 235, 0.18);
  --glow-cyan:     0 0 14px rgba(14, 165, 233, 0.18);
  --radius-card:   16px;
  --radius-btn:    999px;
}

/* =========================================================
   OVERLAY
   ========================================================= */

#vc-isolated .vc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.40);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
}

/* =========================================================
   PANEL SHELL
   ========================================================= */

#vc-isolated .vc-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 460px;
  max-width: 100%;
  height: 100vh;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  border-left: 1px solid rgba(37, 99, 235, 0.12);
  box-shadow: -6px 0 32px rgba(15, 23, 42, 0.09);
  color: var(--text-primary);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#vc-isolated .vc-panel.open { right: 0; }

/* =========================================================
   HEADER
   ========================================================= */

#vc-isolated .vc-header {
  padding: 20px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.10);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 10;
}

#vc-isolated .vc-header h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: 0.2px;
}

#vc-isolated .vc-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 3px 0 0;
}

#vc-isolated .vc-close {
  background: var(--bg-deep);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: background 0.2s ease, color 0.2s ease;
}

#vc-isolated .vc-close:hover {
  background: var(--violet-soft);
  color: var(--violet);
}

/* =========================================================
   BODY
   ========================================================= */

#vc-isolated .vc-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

/* =========================================================
   STEPS
   ========================================================= */

#vc-isolated .vc-step {
  display: none;
  padding: 0 0 100px;
  animation: vcFadeIn 0.2s ease;
}

#vc-isolated .vc-step.active { display: block; }

#vc-isolated .vc-step h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  letter-spacing: 0.2px;
}

@keyframes vcFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   LABELS
   ========================================================= */

#vc-isolated .vc-body label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin: 16px 0 6px;
}

/* =========================================================
   INPUTS, TEXTAREA
   ========================================================= */

#vc-isolated .vc-body input[type="text"],
#vc-isolated .vc-body input[type="tel"],
#vc-isolated .vc-body input[type="email"],
#vc-isolated .vc-body input[type="date"],
#vc-isolated .vc-body input[type="time"],
#vc-isolated .vc-body input[type="number"],
#vc-isolated .vc-body input[type="file"],
#vc-isolated .vc-body textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(37, 99, 235, 0.15);
  font-size: 14px;
  background: var(--bg-deep);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

#vc-isolated .vc-body input::placeholder,
#vc-isolated .vc-body textarea::placeholder { color: #94a3b8; }

#vc-isolated .vc-body input:focus,
#vc-isolated .vc-body textarea:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
  background: var(--bg-card);
}

/* ── Date / Time – light color scheme ── */
#vc-isolated .vc-body input[type="date"],
#vc-isolated .vc-body input[type="time"] { color-scheme: light; }

#vc-isolated .vc-body input[type="date"]::-webkit-calendar-picker-indicator,
#vc-isolated .vc-body input[type="time"]::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: 0.55;
  cursor: pointer;
}

#vc-isolated .vc-body input[type="date"]::-webkit-calendar-picker-indicator:hover,
#vc-isolated .vc-body input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* ── File input ── */
#vc-isolated .vc-body input[type="file"] {
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 12px;
  border: 1.5px dashed rgba(37, 99, 235, 0.20);
}

#vc-isolated .vc-body input[type="file"]::file-selector-button {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(37, 99, 235, 0.20);
  background: var(--bg-deep);
  color: #1e293b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 10px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#vc-isolated .vc-body input[type="file"]::file-selector-button:hover {
  background: var(--violet-soft);
  border-color: var(--violet);
  color: var(--violet);
}

/* ── Input with calendar icon wrapper ── */
#vc-isolated .input-icon { position: relative; }

#vc-isolated .input-icon input { padding-right: 40px; }

#vc-isolated .input-icon::after {
  content: "\f073";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--violet);
  opacity: 0.65;
  pointer-events: none;
}

#vc-isolated .input-icon:hover::after { opacity: 1; }

/* ── Error state on input ── */
#vc-isolated .vc-body input.error-input { border-color: #dc2626; }

/* =========================================================
   COPIES COUNTER
   ========================================================= */

#vc-isolated .vc-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

#vc-isolated .vc-counter button {
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(37, 99, 235, 0.18);
  background: var(--bg-deep);
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  color: var(--violet);
  transition: background 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#vc-isolated .vc-counter button:hover {
  background: var(--violet-soft);
  border-color: var(--violet);
}

#vc-isolated .vc-counter input {
  width: 70px !important;
  text-align: center;
}

/* =========================================================
   TOGGLE BUTTONS  (Print Type / Delivery)
   ========================================================= */

#vc-isolated .vc-toggle-group {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

#vc-isolated .vc-toggle {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.25s ease;
}

#vc-isolated .vc-toggle:hover {
  border-color: var(--violet);
  background: var(--violet-soft);
  color: var(--violet);
}

#vc-isolated .vc-toggle.active {
  background: var(--violet);
  color: #ffffff;
  border-color: var(--violet);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

/* =========================================================
   BILL SUMMARY CARD
   ========================================================= */

#vc-isolated .vc-bill {
  background: var(--bg-deep);
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: var(--radius-card);
  padding: 18px;
  margin-top: 10px;
}

#vc-isolated .vc-bill div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

#vc-isolated .vc-bill hr {
  border: none;
  border-top: 1px dashed rgba(37, 99, 235, 0.20);
  margin: 12px 0;
}

#vc-isolated .vc-bill .total {
  font-size: 17px;
  font-weight: 800;
  color: var(--violet);
  margin-bottom: 0;
}

/* =========================================================
   NOTE / WARNING BLOCK
   ========================================================= */

#vc-isolated .vc-note {
  font-size: 12px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid rgba(245, 158, 11, 0.20);
  padding: 10px 12px;
  border-radius: 10px;
  margin-top: 14px;
  line-height: 1.5;
}

/* =========================================================
   ERROR MESSAGES
   ========================================================= */

#vc-isolated .vc-step .error,
#vc-isolated .vc-body .error {
  display: none;
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
}

#vc-isolated .vc-step .error.show { display: block; }

/* =========================================================
   FOOTER
   ========================================================= */

#vc-isolated .vc-footer {
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
  border-top: 1px solid rgba(37, 99, 235, 0.10);
  padding: 14px 20px;
  display: flex;
  gap: 12px;
  z-index: 10;
}

#vc-isolated .vc-footer button {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  z-index: 1;
}

/* Back */
#vc-isolated .vc-back {
  background: var(--bg-deep);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

#vc-isolated .vc-back:hover {
  background: var(--violet-soft);
  border-color: var(--violet);
  color: var(--violet);
}

/* Next */
#vc-isolated .vc-next {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
}

#vc-isolated .vc-next:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.36);
  transform: translateY(-1px);
}

#vc-isolated .vc-next.disabled,
#vc-isolated .vc-next:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  opacity: 1;
}

/* =========================================================
   UTILITY
   ========================================================= */

#vc-isolated .hidden { display: none !important; }

body.panel-open { overflow: hidden; }

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
  #vc-isolated .vc-panel {
    width: 85%;
    right: -85%;
  }
}

/* Large screens */
@media (min-width: 1600px) {
  #vc-isolated .vc-panel {
    width: 480px;
  }
}

/* Mobile – full width, matches all other panels */
@media (max-width: 640px) {
  #vc-isolated .vc-panel {
    width: 100% !important;
    max-width: 100% !important;
    right: -100% !important;
    border-radius: 0 !important;
  }

  #vc-isolated .vc-panel.open {
    right: 0 !important;
  }

  #vc-isolated .vc-body {
    padding: 16px;
  }

  #vc-isolated .vc-header {
    padding: 16px;
  }

  #vc-isolated .vc-footer {
    padding: 12px 16px;
  }
}