/* Customer Calculator Styles - Clean, Modern Design */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  min-height: 100vh;
  color: var(--gray-800);
  line-height: 1.5;
}

/* Calculator Container */
.calculator {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-text {
  font-size: 40px;
  font-weight: bold;
}

.logo-p {
  color: #f97316;
}

.logo-b {
  color: #22c55e;
}

.header-text h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.header-text p {
  color: var(--gray-500);
  font-size: 0.95rem;
}

/* Progress Bar */
.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 60px;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.progress-step.active .step-number {
  background: var(--primary);
  color: var(--white);
}

.progress-step.completed .step-number {
  background: var(--success);
  color: var(--white);
}

.step-label {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 500;
  transition: color 0.3s ease;
}

.progress-step.active .step-label {
  color: var(--primary);
}

.progress-step.completed .step-label {
  color: var(--success);
}

.progress-line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  margin: 0 8px;
  max-width: 40px;
}

/* Main Content */
.main {
  flex: 1;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

/* Steps */
.step {
  display: none;
  animation: fadeIn 0.3s ease;
}

.step.active {
  display: block;
}

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

.step-header {
  text-align: center;
  margin-bottom: 32px;
}

.step-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.step-header p {
  color: var(--gray-500);
  font-size: 1rem;
}

/* Package Cards */
.package-grid {
  display: grid;
  gap: 16px;
}

.package-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.package-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

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

.package-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.package-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
}

.popular-badge {
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.package-description {
  color: var(--gray-600);
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.package-features {
  list-style: none;
}

.package-features li {
  color: var(--gray-700);
  padding: 6px 0;
  font-size: 0.9rem;
}

/* Category Cards */
.category-grid {
  display: grid;
  gap: 12px;
}

.category-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow);
}

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

.category-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 4px;
}

.category-card p {
  color: var(--gray-500);
  font-size: 0.9rem;
}

/* Width Selector */
.width-selector {
  max-width: 400px;
  margin: 0 auto;
}

.width-input-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.width-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--gray-200);
  background: var(--white);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
}

.width-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.width-btn:active {
  transform: scale(0.95);
}

.width-display {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.width-display input {
  width: 100px;
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--gray-900);
}

.width-display input:focus {
  outline: none;
}

.width-unit {
  color: var(--gray-500);
  font-size: 1rem;
}

.width-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}

.preset-btn {
  padding: 10px 20px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-btn:hover {
  border-color: var(--primary-light);
  background: var(--gray-50);
}

.preset-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.width-hint {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.95rem;
  min-height: 24px;
}

/* Add-ons */
.addons-list {
  display: grid;
  gap: 12px;
}

.addon-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.addon-item:hover {
  border-color: var(--primary-light);
}

.addon-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.addon-checkbox {
  flex-shrink: 0;
}

.checkbox {
  display: block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--gray-300);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
  position: relative;
}

.checkbox.checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
}

.addon-info {
  flex: 1;
}

.addon-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 2px;
}

.addon-info p {
  color: var(--gray-500);
  font-size: 0.85rem;
}

.addon-price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
}

/* Quote Card */
.quote-card {
  background: var(--gray-50);
  border-radius: var(--radius);
  overflow: hidden;
}

.quote-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 32px;
  text-align: center;
}

.quote-total {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.total-label {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.total-amount {
  color: var(--white);
  font-size: 3rem;
  font-weight: 700;
}

.quote-details {
  padding: 24px;
}

.quote-section {
  margin-bottom: 24px;
}

.quote-section:last-child {
  margin-bottom: 0;
}

.quote-section h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.quote-line {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.95rem;
}

.quote-line:last-child {
  border-bottom: none;
}

.quote-line span:first-child {
  color: var(--gray-600);
}

.quote-line span:last-child {
  font-weight: 500;
  color: var(--gray-900);
}

.quote-line.addon-line span:first-child {
  padding-left: 16px;
}

.quote-line.total-line {
  border-top: 2px solid var(--gray-300);
  margin-top: 8px;
  padding-top: 16px;
  font-size: 1.1rem;
}

.quote-line.total-line span:last-child {
  font-weight: 700;
  color: var(--primary);
}

.quote-cta {
  padding: 24px;
  text-align: center;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}

.quote-cta p {
  color: var(--gray-600);
  margin-bottom: 16px;
}

.btn-cta {
  display: inline-block;
  background: var(--success);
  color: var(--white);
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-cta:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Step Actions */
.step-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.btn-back {
  background: transparent;
  border: none;
  color: var(--gray-500);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  padding: 12px 20px;
  transition: color 0.2s ease;
}

.btn-back:hover {
  color: var(--gray-700);
}

.btn-next,
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-next:hover,
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Footer */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--gray-500);
  font-size: 0.85rem;
}

.footer p {
  margin-bottom: 8px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-links span {
  color: var(--gray-300);
}

/* Responsive */
@media (max-width: 640px) {
  .calculator {
    padding: 12px;
  }
  
  .header {
    padding: 16px;
  }
  
  .logo {
    width: 48px;
    height: 48px;
  }
  
  .header-text h1 {
    font-size: 1.25rem;
  }
  
  .progress-bar {
    padding: 12px;
  }
  
  .step-label {
    display: none;
  }
  
  .main {
    padding: 20px;
  }
  
  .step-header h2 {
    font-size: 1.5rem;
  }
  
  .package-card {
    padding: 16px;
  }
  
  .width-display input {
    font-size: 2rem;
    width: 80px;
  }
  
  .width-btn {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
  }
  
  .preset-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
  
  .total-amount {
    font-size: 2.5rem;
  }
  
  .step-actions {
    flex-direction: column-reverse;
    gap: 12px;
  }
  
  .btn-back {
    text-align: center;
  }
}

/* Loading State */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--gray-500);
}

.loading::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
