:root {
  --pc-accent-light: color-mix(in srgb, var(--primary) 8%, transparent);
  --pc-text: #1A1A1A;
  --pc-muted: #6B7280;
  --pc-border: #E5E7EB;
}

.pc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.pc-modal {
  background: #fff;
  border-radius: 12px;
  border: 2px solid var(--primary);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.39);
}

.pc-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--pc-muted);
}

.pc-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}

.pc-progress > .pc-progress-bar {
  display: none;
}

.pc-progress-segment {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--pc-border);
}

.pc-progress-segment.active {
  background: var(--primary);
}

.pc-step-label {
  font-size: 13px;
  color: var(--pc-muted);
  margin-bottom: 12px;
}

.pc-step-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--pc-text);
  margin-bottom: 6px;
}

.pc-step-subtitle {
  font-size: 14px;
  color: var(--pc-muted);
  margin-bottom: 20px;
}

.pc-field-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--pc-muted);
  margin-bottom: 8px;
  display: block;
}

.pc-input, .pc-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--pc-border);
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 16px;
}

.pc-option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.pc-option-card {
  border: 1px solid var(--pc-border);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s;
}

.pc-option-card:hover {
  border-color: var(--primary);
}

.pc-option-card.selected {
  border-color: var(--primary);
  background: var(--pc-accent-light);
}

.pc-option-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}

.pc-option-desc {
  font-size: 13px;
  color: var(--pc-muted);
}

.pc-option-check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.pc-option-card.selected .pc-option-check {
  display: flex;
}

.pc-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #14532d;
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
}

.pc-option-card.selected .pc-badge {
  display: none;
}

.pc-tag-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.pc-tag {
  background: var(--pc-border);
  color: var(--pc-text);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
}

.pc-note {
  background: var(--pc-accent-light);
  border-left: 3px solid var(--primary);
  padding: 12px 14px;
  font-size: 14px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.pc-estimate-box {
  background: var(--pc-accent-light);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}

.pc-estimate-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.pc-estimate-caption {
  font-size: 12px;
  color: var(--pc-muted);
  margin-top: 4px;
}

.pc-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}

.pc-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
}

.pc-btn-primary {
  background: var(--primary);
  color: #fff;
  margin-left: auto;
}

.pc-btn-primary:not(:disabled):hover {
  background: var(--primary-dark);
}

.pc-btn-primary:disabled {
  background: var(--pc-border);
  color: var(--pc-muted);
  cursor: not-allowed;
}

.pc-btn-secondary {
  background: #fff;
  border: 1px solid var(--pc-border);
  color: var(--pc-text);
}

.pc-error-message {
  color: #C0392B;
  font-size: 12px;
  margin-top: -12px;
  margin-bottom: 12px;
  min-height: 16px;
}

.pc-input.pc-input-error {
  border-color: #C0392B !important;
}

.pc-overlay[hidden] {
  display: none !important;
}

/* Mobile Responsiveness (max-width: 480px) */
@media (max-width: 480px) {
  .pc-modal {
    width: 92vw;
    max-height: 85vh;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
  }
  
  #pcStepContent {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
  }
  
  .pc-step-title {
    font-size: 20px;
  }
  
  .pc-option-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .pc-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 12px;
    right: 12px;
    font-size: 28px;
    z-index: 10;
  }
  
  .pc-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--pc-border);
  }
}

/* Floating Trigger Button */
.pc-floating-btn {
  display: none; /* Hide on desktop */
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 16px 28px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  z-index: 9998;
  box-shadow: 0 10px 25px rgba(200, 92, 58, 0.3);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  animation: pcPulse 2s infinite ease-in-out;
}

.pc-floating-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 12px 30px rgba(200, 92, 58, 0.45);
}

@keyframes pcPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 10px 25px rgba(200, 92, 58, 0.3);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 12px 35px rgba(200, 92, 58, 0.55);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 10px 25px rgba(200, 92, 58, 0.3);
  }
}

@media (max-width: 480px) {
  .pc-floating-btn {
    display: block; /* Show on mobile */
    bottom: 16px;
    right: 16px;
    padding: 12px 20px;
    font-size: 12px;
  }
  
  .pc-nav-btn {
    display: none !important; /* Hide navbar button on mobile */
  }
}
