/* Calculator — London Moving PRO Design */
.calculator .container {
  background: white;
  border-radius: var(--radius-2xl);
  padding: 3rem;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
}

.calc-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
  position: relative;
  padding: 0 1rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.75rem 1rem;
}

.calc-progress::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gray-200);
  z-index: 0;
}

.calc-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--gray-500);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  padding: 0.35rem 0.6rem;
  border-radius: 12px;
}

/* Step number circle */
.calc-step-num {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 4px solid var(--gray-200);
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.2rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.calc-step.active .calc-step-num {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.calc-step.completed .calc-step-num {
  border-color: var(--secondary);
  background: var(--secondary);
  color: white;
}

/* Step label below circle */
.calc-step-label {
  font-size: 0.95rem;
  font-weight: 600;
}

.calc-step.active { color: var(--gray-900); background: rgba(14, 165, 233, 0.08); }
.calc-step:hover { color: var(--gray-900); }

.calc-step-content {
  display: none;
  animation: calcFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 960px;
}

.calc-step-content.active { display: block; }

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

.calc-step-content h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
}

.calc-field { margin-bottom: 1.25rem; }

.calc-field label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.calc-field input,
.calc-field select {
  width: 100%;
  min-height: 48px;
  padding: 14px 18px;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--gray-900);
  background: var(--surface-alt);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.calc-field input:hover,
.calc-field select:hover {
  border-color: var(--gray-300);
}

.calc-field input:focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.1);
}

.calc-field input::placeholder { color: var(--gray-400); }

.calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.calc-step-hint {
  font-size: 0.95rem;
  color: var(--gray-600);
  margin: -0.5rem 0 1.5rem;
  line-height: 1.5;
}

.calc-address-block {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem;
  margin-bottom: 1rem;
  background: var(--surface-alt);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  transition: border-color var(--transition);
}
.calc-address-block:focus-within {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}
.calc-address-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.calc-address-field {
  flex: 1;
  min-width: 0;
}
.calc-address-field label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}
.calc-address-field input {
  width: 100%;
  min-height: 48px;
  padding: 14px 18px;
  font-size: 1.05rem;
}
.calc-address-field .calc-field-hint {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 4px;
}
.calc-input-invalid {
  border-color: var(--danger) !important;
  background: #fef2f2 !important;
}

.calc-validation {
  color: var(--danger);
  font-size: 0.9rem;
  margin: 0.75rem 0;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border-radius: var(--radius-md);
}

.calc-hint {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
}
.calc-hint.calc-distance-auto {
  color: var(--secondary);
  background: rgba(20, 184, 166, 0.1);
}

/* Inventory — larger, readable controls */
.calc-inventory-controls {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(90px, 100px) auto;
  gap: 1.25rem;
  margin-bottom: 2rem;
  align-items: end;
}

.calc-inventory-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc-inventory-field label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
}

.calc-inventory-field select,
.calc-inventory-field input {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--gray-900);
  background: var(--surface-alt);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.calc-inventory-field input[type="number"] {
  font-size: 1.15rem;
  font-weight: 700;
  text-align: center;
  -moz-appearance: textfield;
}

.calc-inventory-field input[type="number"]::-webkit-outer-spin-button,
.calc-inventory-field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calc-inventory-field select:hover,
.calc-inventory-field input:hover {
  border-color: var(--gray-300);
}

.calc-inventory-field select:focus,
.calc-inventory-field input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.calc-inventory-add .btn {
  min-height: 52px;
  padding: 14px 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.calc-inventory-add-label {
  display: none; /* Spacer for grid alignment */
}

@media (max-width: 640px) {
  .calc-inventory-controls {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .calc-inventory-qty { grid-column: 1; }
  .calc-inventory-add { grid-column: 2; }
  .calc-inventory-add .btn { width: 100%; min-height: 52px; }
}

.calc-items-list {
  min-height: 200px;
  padding: 1.5rem;
  background: var(--surface-alt);
  border: 3px dashed var(--gray-300);
  border-radius: var(--radius-xl);
  margin-bottom: 1rem;
}

.calc-items-empty {
  color: var(--gray-500);
  font-style: italic;
  font-size: 1.05rem;
  text-align: center;
  padding: 2.5rem;
}

.calc-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: white;
  border-radius: var(--radius-lg);
  margin-bottom: 0.5rem;
  border: 1px solid var(--gray-200);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--gray-800);
  transition: var(--transition);
}

.calc-item-row span {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.calc-item-row:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateX(5px);
}

.calc-item-remove {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.calc-item-remove:hover {
  opacity: 0.9;
  background: rgba(239, 68, 68, 0.08);
}

.calc-category-header {
  font-weight: 700;
  color: var(--primary);
  margin: 1.25rem 0 0.5rem;
  font-size: 1.2rem;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary);
}

.calc-category-header:first-child { margin-top: 0; }

.calc-total-vol {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: right;
  padding: 1.25rem 1.5rem;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.calc-total-vol strong {
  color: var(--primary);
  font-size: 1.25rem;
}

.calc-size-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
  background: white;
  border: 1px solid var(--gray-200);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* Labor & Services */
.calc-labor-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.calc-labor-opt {
  padding: 1.5rem;
  text-align: center;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  background: white;
  font-family: inherit;
  font-size: inherit;
  width: 100%;
}

.calc-labor-opt:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.calc-labor-opt.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.calc-labor-count {
  display: block;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.calc-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.calc-service-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition);
  background: white;
}

.calc-service-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.calc-service-card.selected {
  background: #f0f9ff;
  border-color: var(--primary);
}

.calc-service-card input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--secondary);
}

.calc-service-card strong { display: block; font-size: 0.95rem; }
.calc-service-card .calc-service-desc { font-size: 0.85rem; color: var(--gray-500); }
.calc-service-card .calc-service-price { font-weight: 700; color: var(--secondary); margin-top: 0.25rem; }

/* Estimate preview */
.calc-estimate {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 1.5rem;
  background: var(--gray-50);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}

.calc-estimate span {
  font-size: 0.9rem;
  color: var(--gray-500);
}

.calc-estimate strong {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.calc-estimate small {
  color: var(--gray-500);
}

/* Result */
.calc-result {
  display: none;
  margin-top: 2rem;
  padding: 2.5rem;
  background: linear-gradient(145deg, #f0f9ff, white);
  border-radius: var(--radius-xl);
  border: 3px solid var(--primary);
  animation: calcFadeIn 0.5s ease;
  box-shadow: var(--shadow-xl);
}

.calc-result.visible { display: block; }

.calc-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}
.calc-result-header h3 { margin: 0; }

.calc-result h3 { margin-bottom: 1rem; font-weight: 700; }
.calc-result-header + .calc-price-display { margin-top: 0; }

.calc-price-display {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.calc-breakdown {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  border: 2px solid var(--gray-200);
  overflow-x: auto;
}

.calc-move-details {
  padding: 1rem 0 1.25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.95rem;
  color: var(--gray-700);
}
.calc-move-details strong { color: var(--gray-900); }

.calc-breakdown table { width: 100%; border-collapse: collapse; }

.calc-breakdown td {
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-600);
}

.calc-breakdown td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--gray-900);
}

.calc-breakdown .calc-total-row td {
  border-top: 3px solid var(--primary);
  padding-top: 1rem;
  font-weight: 800;
  font-size: 1.2rem;
}

.calc-order-form {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.calc-order-form h4 { margin-bottom: 1.5rem; font-size: 1.2rem; }

.calc-order-summary {
  background: white;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  margin: 1rem 0;
  font-size: 0.95rem;
  border: 2px solid var(--gray-200);
}

.calc-order-summary .calc-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed var(--gray-300);
}

.calc-order-summary .calc-summary-row:last-child {
  border-bottom: none;
  font-weight: 700;
  color: var(--primary);
}

.calc-success {
  text-align: center;
  padding: 3rem;
  background: #d1fae5;
  border-radius: var(--radius-xl);
  color: #065f46;
}

.calc-success h3 {
  font-size: clamp(1.8rem, 4vw, 2.2rem);
  margin-bottom: 1rem;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-loading::before {
    animation: none;
    border-right-color: currentColor;
  }
}

@media (max-width: 640px) {
  .calc-address-block { flex-direction: column; align-items: stretch; }
  .calc-address-icon { text-align: center; }
}

@media (max-width: 768px) {
  .calculator .container { padding: 2rem 1.5rem; }
  .calc-progress { flex-wrap: wrap; gap: 1rem; justify-content: center; padding: 0 0.5rem; }
  .calc-progress::before { display: none; }
  .calc-step { min-width: 70px; }
  .calc-step-num { width: 44px; height: 44px; font-size: 1rem; }
  .calc-step-label { font-size: 0.85rem; }
  .calc-row { grid-template-columns: 1fr; }
  .calc-labor-options { grid-template-columns: 1fr; }
  .calc-step-content h3 { font-size: 1.35rem; margin-bottom: 1rem; }
}

@media (max-width: 480px) {
  .calculator .container { padding: 1.5rem 1rem; }
}
