/**
 * Patched Custom - Modern Pricing Calculator & 3D Patch Studio Styles
 */

/* Hero Banner */
.calc-hero-section {
  background: radial-gradient(circle at 80% 20%, #1e293b 0%, #0f172a 100%);
  padding: 50px 0 35px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.calc-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #f87171;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  border-radius: 50px;
}

.calc-hero-title {
  font-size: clamp(1.8rem, 3.2vw, 2.75rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

/* Studio Wrapper & Dual Panels */
.calc-studio-section {
  background: #f8fafc;
  padding: 40px 0 70px;
}

/* 3D Visualizer Card (Left) */
.pc-3d-card {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  position: sticky;
  top: 90px;
}

.pc-3d-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.pc-3d-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pc-3d-pulse {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  display: inline-block;
  animation: pcPulse 2s infinite;
}

@keyframes pcPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
}

.pc-3d-canvas-wrap {
  width: 100%;
  height: 480px;
  position: relative;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, #f1f5f9 100%);
}

#patch3DCanvasContainer {
  width: 100%;
  height: 100%;
}

/* 3D Overlay Hint */
.pc-3d-hint-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  z-index: 10;
}

/* Quick Shape Selector Bar in 3D Card */
.pc-3d-shape-bar {
  padding: 10px 18px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.pc-quick-shape-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  padding: 4px 11px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.pc-quick-shape-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.pc-quick-shape-btn.is-active {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

/* Dedicated 3D Control Bar (Clean, Separated, No Overlap) */
.pc-3d-control-bar {
  padding: 12px 18px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.pc-bar-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  padding: 8px 16px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  white-space: nowrap;
}

.pc-bar-btn:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.pc-bar-btn:hover .text-danger {
  color: #f87171 !important;
}

.pc-lighting-group {
  display: flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 30px;
  gap: 2px;
}

.pc-light-pill {
  border: none;
  background: transparent;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pc-light-pill:hover {
  color: #0f172a;
}

.pc-light-pill.is-active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 3D Dropzone footer */
.pc-3d-dropzone {
  padding: 16px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.studio-dropzone-box {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.2s ease;
}

.studio-dropzone-box:hover,
.studio-dropzone-box.is-dragover {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.03);
}

/* Configurator Panels (Right) */
.pc-config-box {
  background: #ffffff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  padding: 28px;
  box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  margin-bottom: 24px;
}

.pc-config-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 20px;
}

.pc-step-badge {
  background: #dc2626;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

/* Style Tiles Grid */
.pc-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.pc-style-card {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.pc-style-card * {
  pointer-events: none;
}

.pc-style-card:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
}

.pc-style-card.is-active {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.03);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.15);
}

.pc-style-icon {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.pc-style-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

/* Shape Pills */
.pc-shape-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pc-shape-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pc-shape-btn:hover {
  background: #f1f5f9;
}

.pc-shape-btn.is-active {
  border-color: #dc2626;
  background: #dc2626;
  color: #ffffff;
}

/* Dimension Sliders & Inputs */
.pc-dim-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
}

/* Quantity Quick Pills */
.pc-qty-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pc-qty-pill {
  border: 2px solid #e2e8f0;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1 1 calc(25% - 8px);
  min-width: 70px;
  text-align: center;
}

.pc-qty-pill:hover {
  border-color: #94a3b8;
}

.pc-qty-pill.is-active {
  border-color: #dc2626;
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

/* Backing Options */
.pc-backing-card {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
}

.pc-backing-card:hover {
  border-color: #94a3b8;
}

input[name="patchBacking"]:checked+.pc-backing-card {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.04);
}

/* Summary Price Breakdown Card (Glassmorphic) */
.pc-price-summary-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 20px;
  padding: 28px;
  color: #ffffff;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.35);
  position: relative;
  overflow: hidden;
}

.pc-price-summary-card::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

.pc-price-hero-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.pc-price-huge {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
}

.pc-price-per-patch {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f87171;
}

.pc-savings-badge {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pc-summary-list {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 0;
  margin: 16px 0 20px;
}

.pc-summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 5px 0;
  color: #cbd5e1;
}

.pc-summary-item strong {
  color: #ffffff;
}

.btn-lock-quote {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border: none;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 16px 24px;
  border-radius: 50px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.35);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-lock-quote:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.45);
  color: #ffffff;
}

/* Wholesale Tier Comparison Table */
.pc-tier-table-section {
  padding: 60px 0;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.pc-table-card {
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px -10px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.table-tier-header {
  background: #0f172a;
  color: #ffffff;
}

.table-tier-header th {
  padding: 16px;
  font-weight: 700;
  font-size: 0.88rem;
}

.pc-tier-table td {
  padding: 14px 16px;
  font-size: 0.9rem;
  vertical-align: middle;
}

.col-highlight-tier {
  background: rgba(220, 38, 38, 0.05);
  font-weight: 700;
  color: #dc2626;
}

/* Mobile Sticky Bar */
@media (max-width: 991.98px) {
  .pc-3d-card {
    position: relative;
    top: 0;
    margin-bottom: 24px;
  }

  .pc-3d-canvas-wrap {
    height: 380px;
  }

  .pc-mobile-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0f172a;
    padding: 12px 18px;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Modern & Compact Modal Styling (#calcProofModal) */
.pc-modal-card {
  background: #ffffff;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.25) !important;
}

.pc-modal-header-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.pc-modal-config-strip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #dc2626;
  border-radius: 8px;
  padding: 5px 10px;
}

.pc-modal-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 2px;
  display: block;
}

.pc-input-wrap {
  position: relative;
}

.pc-input-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.76rem;
  pointer-events: none;
  z-index: 2;
}

.pc-modal-input {
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  font-size: 0.82rem !important;
  padding: 0.38rem 0.65rem !important;
  color: #0f172a !important;
  background-color: #ffffff !important;
  transition: all 0.2s ease !important;
  height: 34px !important;
}

.pc-input-wrap .pc-modal-input {
  padding-left: 2rem !important;
}

.pc-modal-input:focus {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
  background-color: #ffffff !important;
}

.pc-file-compact-wrap {
  width: 100%;
}

.pc-file-compact-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.38rem 0.65rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  height: 34px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
}

.pc-file-compact-label:hover {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.04);
  color: #dc2626;
}

.pc-modal-submit-btn {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  border: none !important;
  font-size: 0.88rem !important;
  letter-spacing: 0.02em;
  padding: 0.55rem 1rem !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.pc-modal-submit-btn:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3) !important;
}

/* IntlTelInput integration inside compact modal (Generous padding-left from parent class, zero overlap) */
.pc-phone-wrap,
#calcProofModal .pc-phone-wrap {
  width: 100% !important;
  position: relative !important;
  display: block !important;
}

.pc-phone-wrap .iti,
#calcProofModal .pc-phone-wrap .iti,
#calcProofModal .iti {
  width: 100% !important;
  display: block !important;
  position: relative !important;
}

#calcProofModal .iti__country-list {
  z-index: 1065 !important;
  font-size: 0.82rem;
}

.pc-phone-wrap input,
.pc-phone-wrap input[type="tel"],
.pc-phone-wrap input.form-control,
.pc-phone-wrap input.intl-phone-field,
.pc-phone-wrap .iti input,
.pc-phone-wrap .iti input[type="tel"],
.pc-phone-wrap .iti input.form-control,
.pc-phone-wrap .iti--separate-dial-code input,
.pc-phone-wrap .iti--separate-dial-code input[type="tel"],
.pc-phone-wrap .iti--separate-dial-code input.form-control,
.pc-phone-wrap .iti--separate-dial-code input.intl-phone-field,
#calcProofModal .pc-phone-wrap input,
#calcProofModal .pc-phone-wrap input[type="tel"],
#calcProofModal .pc-phone-wrap input.form-control,
#calcProofModal .pc-phone-wrap input.intl-phone-field,
#calcProofModal .pc-phone-wrap .iti input,
#calcProofModal .pc-phone-wrap .iti input[type="tel"],
#calcProofModal .pc-phone-wrap .iti input.form-control,
#calcProofModal .pc-phone-wrap .iti--separate-dial-code input,
#calcProofModal .pc-phone-wrap .iti--separate-dial-code input[type="tel"],
#calcProofModal .pc-phone-wrap .iti--separate-dial-code input.form-control,
#calcProofModal .pc-phone-wrap .iti--separate-dial-code input.intl-phone-field,
#calcProofModal .iti input,
#calcProofModal .iti input[type="tel"],
#calcProofModal .iti--separate-dial-code input[type="tel"],
#calcProofModal .iti--separate-dial-code input.form-control,
#calcProofModal .iti--separate-dial-code input.intl-phone-field,
#calcProofModal #modalPhone {
  width: 100%;
  padding-left: 132px;
  height: 34px;
  min-height: 34px;
  max-height: 34px;
  font-size: 0.82rem;
  line-height: normal;
  box-sizing: border-box;
}

#calcProofModal .iti__selected-flag {
  padding-left: 10px !important;
  padding-right: 6px !important;
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  background-color: #f8fafc !important;
  border-right: 1.5px solid #dbe2ea !important;
  border-radius: 8px 0 0 8px !important;
  display: flex !important;
  align-items: center !important;
}

#calcProofModal .iti__selected-dial-code {
  font-size: 0.82rem;
  color: #334155;
  margin-left: 4px;
  font-weight: 600;
}

div#calcProofModal {
  overflow: hidden;
}