/* ==========================================
   COST CALCULATOR MODAL
   ========================================== */

/* Modal Overlay */
.calculator-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 47, 75, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.calculator-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Container */
.calculator-container {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  max-width: 700px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.calculator-modal.active .calculator-container {
  transform: scale(1);
}

/* Close Button */
.calculator-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(26, 47, 75, 0.1);
  border-radius: 50%;
  font-size: 24px;
  color: var(--navy-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.calculator-close:hover {
  background: var(--copper-accent);
  color: white;
  transform: rotate(90deg);
}

/* Progress Bar */
.calculator-progress {
  padding: 30px 40px 20px;
  border-bottom: 1px solid rgba(26, 47, 75, 0.1);
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin-bottom: 15px;
}

.progress-steps::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(204, 148, 97, 0.2);
  z-index: 0;
}

.progress-line {
  position: absolute;
  top: 15px;
  left: 0;
  height: 2px;
  background: var(--copper-accent);
  transition: width 0.4s ease;
  z-index: 1;
}

.progress-step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: white;
  border: 2px solid rgba(204, 148, 97, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-gray);
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.progress-step.active {
  background: var(--copper-accent);
  border-color: var(--copper-accent);
  color: white;
  transform: scale(1.1);
}

.progress-step.completed {
  background: var(--copper-accent);
  border-color: var(--copper-accent);
  color: white;
}

.progress-label {
  text-align: center;
  font-size: 12px;
  color: var(--dark-gray);
  margin-top: 8px;
}

/* Calculator Body */
.calculator-body {
  padding: 40px;
}

.calculator-step {
  display: none;
  animation: fadeInStep 0.4s ease;
}

.calculator-step.active {
  display: block;
}

@keyframes fadeInStep {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy-primary);
  margin-bottom: 10px;
}

.step-subtitle {
  font-size: 16px;
  color: var(--dark-gray);
  margin-bottom: 30px;
}

/* Project Type Grid */
.project-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.project-type-card {
  background: white;
  border: 2px solid rgba(26, 47, 75, 0.1);
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.project-type-card:hover {
  border-color: var(--copper-accent);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(204, 148, 97, 0.2);
}

.project-type-card.selected {
  border-color: var(--copper-accent);
  background: rgba(204, 148, 97, 0.05);
}

.project-type-card.selected::before {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  background: var(--copper-accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.project-type-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-type-icon svg {
  width: 100%;
  height: 100%;
  transition: all 0.3s ease;
}

.project-type-card:hover .project-type-icon svg {
  transform: scale(1.1);
}

.project-type-card.selected .project-type-icon svg {
  stroke: #b8845a;
}

.project-type-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy-primary);
}

/* Standing Selection (Sub-menu) */
.standing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.standing-card {
  background: white;
  border: 2px solid rgba(26, 47, 75, 0.1);
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.standing-card:hover {
  border-color: var(--copper-accent);
  background: rgba(204, 148, 97, 0.02);
}

.standing-card.selected {
  border-color: var(--copper-accent);
  background: rgba(204, 148, 97, 0.05);
  color: var(--copper-accent);
  font-weight: 600;
}

.standing-name {
  font-size: 14px;
  color: var(--navy-primary);
}

.standing-card.selected .standing-name {
  color: var(--copper-accent);
}

/* Surface Slider */
.surface-slider-container {
  margin-bottom: 30px;
}

.surface-value {
  font-size: 48px;
  font-weight: 700;
  color: var(--copper-accent);
  text-align: center;
  margin-bottom: 20px;
}

.surface-value span {
  font-size: 24px;
  color: var(--dark-gray);
}

.surface-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(204, 148, 97, 0.2);
  outline: none;
  -webkit-appearance: none;
  margin-bottom: 10px;
}

.surface-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--copper-accent);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(204, 148, 97, 0.4);
}

.surface-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--copper-accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(204, 148, 97, 0.4);
}

.surface-range {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--dark-gray);
}

/* Service Checkboxes */
.service-list {
  display: grid;
  gap: 15px;
  margin-bottom: 30px;
}

.service-checkbox {
  display: flex;
  align-items: center;
  padding: 20px;
  background: white;
  border: 2px solid rgba(26, 47, 75, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.service-checkbox:hover {
  border-color: var(--copper-accent);
  background: rgba(204, 148, 97, 0.02);
}

.service-checkbox input[type="checkbox"] {
  display: none;
}

.service-checkbox-custom {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(26, 47, 75, 0.3);
  border-radius: 6px;
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.service-checkbox input[type="checkbox"]:checked + .service-checkbox-custom {
  background: var(--copper-accent);
  border-color: var(--copper-accent);
}

.service-checkbox
  input[type="checkbox"]:checked
  + .service-checkbox-custom::after {
  content: "✓";
  color: white;
  font-size: 16px;
}

.service-info {
  flex: 1;
}

.service-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-primary);
  margin-bottom: 5px;
}

.service-desc {
  font-size: 14px;
  color: var(--dark-gray);
}

/* Finish Level */
.finish-level-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.finish-level-card {
  background: white;
  border: 2px solid rgba(26, 47, 75, 0.1);
  border-radius: 12px;
  padding: 25px 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.finish-level-card:hover {
  border-color: var(--copper-accent);
  transform: translateY(-3px);
}

.finish-level-card.selected {
  border-color: var(--copper-accent);
  background: rgba(204, 148, 97, 0.05);
}

.finish-level-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy-primary);
  margin-bottom: 8px;
}

.finish-level-multiplier {
  font-size: 14px;
  color: var(--copper-accent);
  font-weight: 600;
}

/* Result Display */
.result-display {
  text-align: center;
  margin-bottom: 30px;
}

.price-result {
  font-size: 56px;
  font-weight: 700;
  color: var(--copper-accent);
  margin-bottom: 10px;
}

.price-range {
  font-size: 18px;
  color: var(--dark-gray);
  margin-bottom: 20px;
}

.price-disclaimer {
  font-size: 14px;
  color: var(--dark-gray);
  font-style: italic;
  padding: 15px;
  background: rgba(204, 148, 97, 0.05);
  border-radius: 8px;
  margin-bottom: 30px;
}

/* Lead Form */
.lead-form {
  display: grid;
  gap: 20px;
}

.form-group-calc {
  position: relative;
}

.form-group-calc input,
.form-group-calc textarea {
  width: 100%;
  padding: 15px;
  border: 2px solid rgba(26, 47, 75, 0.1);
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 15px;
  transition: all 0.3s ease;
}

.form-group-calc input:focus,
.form-group-calc textarea:focus {
  outline: none;
  border-color: var(--copper-accent);
}

.form-group-calc label {
  position: absolute;
  top: 15px;
  left: 15px;
  color: var(--dark-gray);
  font-size: 15px;
  pointer-events: none;
  transition: all 0.3s ease;
}

.form-group-calc input:focus + label,
.form-group-calc input:not(:placeholder-shown) + label,
.form-group-calc textarea:focus + label,
.form-group-calc textarea:not(:placeholder-shown) + label {
  top: -10px;
  left: 10px;
  font-size: 12px;
  background: white;
  padding: 0 5px;
  color: var(--copper-accent);
}

/* Navigation Buttons */
.calculator-nav {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.calc-btn {
  flex: 1;
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.calc-btn-primary {
  background: var(--copper-accent);
  color: white;
}

.calc-btn-primary:hover {
  background: #b8845a;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(204, 148, 97, 0.3);
}

.calc-btn-secondary {
  background: rgba(26, 47, 75, 0.1);
  color: var(--navy-primary);
}

.calc-btn-secondary:hover {
  background: rgba(26, 47, 75, 0.2);
}

.calc-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .calculator-container {
    width: 95%;
    max-height: 95vh;
  }

  .calculator-body {
    padding: 30px 25px;
  }

  .project-type-grid {
    grid-template-columns: 1fr;
  }

  .finish-level-grid {
    grid-template-columns: 1fr;
  }

  .step-title {
    font-size: 24px;
  }

  .price-result {
    font-size: 42px;
  }
}

@media (max-width: 480px) {
  .calculator-progress {
    padding: 20px 20px 15px;
  }

  .calculator-body {
    padding: 25px 20px;
  }

  .progress-step {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .progress-label {
    font-size: 10px;
  }

  .step-title {
    font-size: 22px;
  }

  .surface-value {
    font-size: 38px;
  }

  .price-result {
    font-size: 36px;
  }
}
