/* ============================================================
   PrintEase Core Engine Stylesheet v1.3.0
   Clean Light Theme: White BG | Dark Slate Font | Orange Buttons (#FF6B00)
   ============================================================ */

:root {
  --pe-bg-core: #F8FAFC;
  --pe-card-core: #FFFFFF;
  --pe-border-core: #E2E8F0;
  --pe-primary-core: #FF6B00;
  --pe-primary-hover-core: #E05E00;
  --pe-text-core: #0F172A;
  --pe-muted-core: #64748B;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* ── Order Wizard Modal Overlay ─────────────────────────────── */
.pe-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 16px;
}

.pe-order-modal-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
  position: relative;
  color: #0F172A;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pe-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.pe-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pe-modal-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #FF6B00;
  letter-spacing: 0.5px;
}

.pe-modal-title {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 800;
  color: #0F172A;
}

.pe-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #94A3B8;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
}
.pe-modal-close:hover {
  color: #0F172A;
}

/* Wizard Steps Indicator */
.pe-wizard-steps {
  display: flex;
  border-bottom: 2px solid #E2E8F0;
  margin-bottom: 24px;
}

.pe-wizard-step {
  flex: 1;
  text-align: center;
  padding-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #64748B;
  position: relative;
}

.pe-wizard-step span {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  border-radius: 50%;
  background: #F1F5F9;
  font-size: 11px;
  margin-right: 4px;
  color: #64748B;
  text-align: center;
}

.pe-wizard-step.pe-step-active {
  color: #0F172A;
}

.pe-wizard-step.pe-step-active span {
  background: #FF6B00;
  color: #FFFFFF;
}

.pe-wizard-step.pe-step-active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #FF6B00;
}

.pe-wizard-pane {
  display: none;
}

.pe-wizard-pane.pe-pane-active {
  display: block;
  animation: pe-core-fadein 0.15s ease-out;
}
@keyframes pe-core-fadein {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Field Groups & Labels */
.pe-field-group {
  margin-bottom: 16px;
}
.pe-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 6px;
}
.pe-input-wrap {
  position: relative;
}
.pe-input,
.pe-select {
  width: 100%;
  padding: 11px 14px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  color: #0F172A;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pe-input:focus,
.pe-select:focus {
  border-color: #FF6B00;
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
}

/* Dropzone */
.pe-dropzone {
  border: 2px dashed #CBD5E1;
  border-radius: 14px;
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  background: #F8FAFC;
  transition: border-color 0.2s, background 0.2s;
  margin-top: 6px;
}
.pe-dropzone:hover, .pe-dropzone.pe-dragover {
  border-color: #FF6B00;
  background: #FFF7ED;
}
.pe-dropzone-icon {
  font-size: 36px;
  margin-bottom: 8px;
  color: #FF6B00;
}
.pe-dropzone-text strong {
  display: block;
  font-size: 14px;
  color: #0F172A;
}
.pe-dropzone-text span {
  font-size: 12px;
  color: #64748B;
  display: block;
  margin-top: 2px;
}

/* Selected Document Pill */
.pe-selected-doc-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 14px;
}
.pe-doc-pill-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.pe-doc-pill-icon {
  font-size: 24px;
  color: #FF6B00;
  flex-shrink: 0;
}
.pe-doc-pill-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pe-doc-pill-info strong {
  font-size: 13px;
  color: #0F172A;
  word-break: break-all;
}
.pe-doc-pill-info span {
  font-size: 11px;
  color: #64748B;
}
.pe-doc-pill-remove {
  background: none;
  border: none;
  font-size: 20px;
  color: #94A3B8;
  cursor: pointer;
  padding: 4px;
}
.pe-doc-pill-remove:hover {
  color: #EF4444;
}

/* Upload Progress Bar */
.pe-upload-progress {
  height: 6px;
  background: #E2E8F0;
  border-radius: 3px;
  margin-top: 12px;
  overflow: hidden;
}
.pe-upload-bar {
  height: 100%;
  width: 0%;
  background: #FF6B00;
  transition: width 0.2s;
}

/* Radio Cards Grid for Print Modes */
.pe-radio-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}
.pe-radio-card {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.pe-radio-card:hover {
  border-color: rgba(255, 107, 0, 0.4);
}
.pe-radio-card.pe-radio-card-active,
.pe-radio-card:has(input:checked) {
  border-color: #FF6B00 !important;
  background: #FFF7ED !important;
}
.pe-radio-card input {
  display: none;
}
.pe-radio-card-content strong {
  display: block;
  font-size: 13px;
  color: #0F172A;
}
.pe-radio-card-content span {
  font-size: 12px;
  color: #FF6B00;
  font-weight: 700;
}

/* Copies Counter */
.pe-copies-counter {
  display: flex;
  align-items: center;
  width: 100%;
}
.pe-btn-counter {
  width: 42px;
  height: 42px;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.pe-btn-counter:hover {
  background: #E2E8F0;
}
.pe-btn-counter:first-child {
  border-radius: 10px 0 0 10px;
}
.pe-btn-counter:last-child {
  border-radius: 0 10px 10px 0;
}
.pe-copies-input {
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  text-align: center;
  font-weight: 700;
}

/* Order Summary Box */
.pe-order-summary-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
}
.pe-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #64748B;
  margin-bottom: 10px;
}
.pe-summary-row strong,
.pe-summary-row span:last-child {
  color: #0F172A;
  font-weight: 600;
}
.pe-summary-divider {
  height: 1px;
  background: #E2E8F0;
  margin: 12px 0;
}
.pe-summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
}
.pe-total-amount {
  color: #FF6B00;
  font-size: 20px;
}

/* Privacy Notice Box */
.pe-order-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #F0FDF4;
  border: 1px solid #DCFCE7;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 12px;
  color: #15803D;
  margin-bottom: 20px;
}
.pe-notice-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.pe-notice-text strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

/* Success Screen */
.pe-order-success-screen {
  text-align: center;
  padding: 20px 0;
}
.pe-success-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #DCFCE7;
  color: #16A34A;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-weight: 800;
}
.pe-order-success-screen h2 {
  font-size: 22px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 6px;
}
.pe-order-success-screen p {
  font-size: 14px;
  color: #64748B;
  margin-bottom: 20px;
}
.pe-code-card {
  background: #FFF7ED;
  border: 2px dashed #FF6B00;
  border-radius: 14px;
  padding: 18px 24px;
  margin: 0 auto 24px;
  max-width: 320px;
}
.pe-code-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #FF6B00;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.pe-code-value {
  font-size: 26px;
  font-weight: 800;
  color: #0F172A;
  font-family: monospace;
}
.pe-success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Wizard Nav Buttons */
.pe-wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.pe-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  background: #FF6B00 !important;
  color: #FFFFFF !important;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.25);
}
.pe-btn-primary:hover:not(:disabled) {
  background: #E05E00 !important;
  color: #FFFFFF !important;
  transform: translateY(-1px);
}
.pe-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pe-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  color: #0F172A;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.pe-btn-outline:hover {
  border-color: #94A3B8;
  background: #F8FAFC;
}

/* Spinner */
.pe-btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: pe-core-spin 0.7s linear infinite;
  display: none;
}
@keyframes pe-core-spin { to { transform: rotate(360deg); } }
.pe-loading .pe-btn-text { display: none; }
.pe-loading .pe-btn-spinner { display: block; }