/* ==========================================================================
   ConsultWays B2B Quote & Tiered Matrix Pro - Storefront Theme Extension CSS
   Aesthetic: Ultra-modern, Glassmorphism, Subtle Neon Cyan (#00E5FF) Accents
   ========================================================================== */

:root {
  --cw-cyan: #00E5FF;
  --cw-cyan-glow: rgba(0, 229, 255, 0.4);
  --cw-cyan-soft: rgba(0, 229, 255, 0.12);
  --cw-dark-navy: #0B0F19;
  --cw-card-bg: #151D2A;
  --cw-border-glass: rgba(255, 255, 255, 0.1);
  --cw-text-primary: #F8FAFC;
  --cw-text-secondary: #94A3B8;
  --cw-success: #10B981;
  --cw-radius-lg: 16px;
  --cw-radius-md: 10px;
  --cw-radius-sm: 6px;
}

/* Container */
.cw-b2b-widget-wrapper {
  margin: 20px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
  box-sizing: border-box;
}

/* Volume Pricing Header */
.cw-b2b-tiers-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.cw-b2b-tiers-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cw-b2b-tiers-badge {
  background: var(--cw-cyan-soft);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.3);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

/* Tier Pricing Matrix Cards Grid */
.cw-b2b-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.cw-tier-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--cw-radius-md);
  padding: 12px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.cw-tier-card:hover {
  transform: translateY(-2px);
  border-color: #00bcd4;
  box-shadow: 0 6px 16px rgba(0, 229, 255, 0.18);
}

.cw-tier-card.cw-active-tier {
  border-color: #00b4d8;
  background: #f0f9ff;
  box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.2);
}

.cw-tier-card.cw-best-value {
  border-color: #00E5FF;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
}

.cw-tier-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(135deg, #00E5FF 0%, #0284c7 100%);
  color: #0f172a;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-bottom-left-radius: 6px;
  letter-spacing: 0.3px;
}

.cw-tier-qty {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
}

.cw-tier-price {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.cw-tier-unit {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}

.cw-tier-discount {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 6px;
}

/* Primary CTA Button: Request B2B Bulk Quote */
.cw-quote-cta-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: var(--cw-radius-md);
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border: 1.5px solid #00E5FF;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 229, 255, 0.25);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.cw-quote-cta-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.25), transparent);
  transition: all 0.6s ease;
}

.cw-quote-cta-btn:hover {
  transform: translateY(-2px);
  border-color: #00E5FF;
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.5);
  color: #00E5FF;
}

.cw-quote-cta-btn:hover::before {
  left: 100%;
}

.cw-cta-neon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #00E5FF;
  box-shadow: 0 0 8px #00E5FF;
  animation: cw-pulse 1.8s infinite;
}

@keyframes cw-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.6;
  }
}

/* Glassmorphic Quote Modal */
.cw-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cw-modal-backdrop.cw-modal-open {
  opacity: 1;
  pointer-events: auto;
}

.cw-modal-container {
  width: 100%;
  max-width: 680px;
  background: #111827;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 229, 255, 0.2);
  color: #F8FAFC;
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cw-modal-open .cw-modal-container {
  transform: translateY(0) scale(1);
}

/* Modal Header */
.cw-modal-header {
  padding: 20px 24px;
  background: linear-gradient(90deg, #111827 0%, #1F2937 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cw-modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cw-modal-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00E5FF 0%, #3B82F6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
}

.cw-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
}

.cw-modal-subtitle {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: #94A3B8;
}

.cw-modal-close-btn {
  background: transparent;
  border: none;
  color: #94A3B8;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s ease;
}

.cw-modal-close-btn:hover {
  color: #00E5FF;
}

/* Modal Body */
.cw-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Live Calculator Card */
.cw-calc-card {
  background: #1F2937;
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 12px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}

.cw-calc-qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.cw-calc-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #374151;
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.cw-calc-btn:hover {
  background: #4B5563;
  color: #00E5FF;
}

.cw-calc-input {
  width: 70px;
  height: 32px;
  text-align: center;
  border-radius: 8px;
  background: #111827;
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00E5FF;
  font-weight: 800;
  font-size: 16px;
  outline: none;
}

.cw-calc-totals {
  text-align: right;
}

.cw-calc-total-label {
  font-size: 11px;
  color: #94A3B8;
  text-transform: uppercase;
}

.cw-calc-total-price {
  font-size: 24px;
  font-weight: 800;
  color: #00E5FF;
  margin: 2px 0;
}

.cw-calc-savings {
  font-size: 12px;
  font-weight: 700;
  color: #34D399;
}

/* Form Grid */
.cw-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cw-form-full {
  grid-column: span 2;
}

.cw-form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #CBD5E1;
  margin-bottom: 6px;
}

.cw-form-input,
.cw-form-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: #1F2937;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #F8FAFC;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.cw-form-input:focus,
.cw-form-textarea:focus {
  border-color: #00E5FF;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

/* Modal Footer */
.cw-modal-footer {
  padding: 16px 24px;
  background: #111827;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.cw-btn-submit-quote {
  padding: 12px 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00E5FF 0%, #3B82F6 100%);
  border: none;
  color: #0B0F19;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
  transition: transform 0.2s ease;
}

.cw-btn-submit-quote:hover {
  transform: translateY(-1px);
}

.cw-btn-submit-quote:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Success Confirmation State */
.cw-success-container {
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.cw-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  border: 2px solid #10B981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #10B981;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}

.cw-success-title {
  font-size: 22px;
  font-weight: 800;
  color: #F8FAFC;
  margin: 0;
}

.cw-success-quote-no {
  font-family: monospace;
  font-size: 16px;
  color: #00E5FF;
  background: rgba(0, 229, 255, 0.1);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.cw-success-desc {
  color: #94A3B8;
  font-size: 14px;
  max-width: 440px;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 640px) {
  .cw-form-grid {
    grid-template-columns: 1fr;
  }
  .cw-form-full {
    grid-column: span 1;
  }
  .cw-calc-card {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .cw-calc-totals {
    text-align: left;
    margin-top: 10px;
  }
}
