/* Elithan Price Calculator Styles - Ljust tema */
.price-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: #ffffff;
  margin: 2% auto;
  padding: 0;
  border-radius: 20px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  position: relative;
  color: #333333;
  border: 1px solid #e5e7eb;
}

.close {
  color: #666;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 20px;
  top: 20px;
  z-index: 1001;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover,
.close:focus {
  color: #4f46e5;
}

.modal-header {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  padding: 40px 30px 30px;
  text-align: center;
  border-radius: 20px 20px 0 0;
  color: white;
}

.modal-header h2 {
  margin: 0 0 10px 0;
  font-size: 2em;
  font-weight: 700;
  color: white;
}

.modal-header p {
  margin: 0 0 20px 0;
  opacity: 0.9;
  font-size: 1.1em;
  color: white;
}

.progress-bar {
  background: rgba(255, 255, 255, 0.2);
  height: 6px;
  border-radius: 3px;
  margin: 20px 0 10px 0;
  overflow: hidden;
}

.progress-fill {
  background: white;
  height: 100%;
  width: 12.5%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.step-counter {
  font-size: 0.9em;
  opacity: 0.8;
  color: white;
}

#price-calculator-form {
  padding: 30px;
}

.form-step {
  display: none;
  min-height: 300px;
}

.form-step.active {
  display: block;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.form-step h3 {
  color: #1f2937;
  font-size: 1.5em;
  margin-bottom: 25px;
  font-weight: 600;
}

.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  padding: 20px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.radio-option:hover,
.checkbox-option:hover {
  background: #f3f4f6;
  border-color: #4f46e5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.radio-option input[type="radio"]:checked + .radio-custom + .option-content,
.checkbox-option input[type="checkbox"]:checked + .checkbox-custom + .option-content {
  color: #4f46e5;
}

.radio-option input[type="radio"]:checked ~ *,
.checkbox-option input[type="checkbox"]:checked ~ * {
  border-color: #4f46e5;
  background: #f0f9ff;
}

.radio-custom,
.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  margin-right: 15px;
  position: relative;
  flex-shrink: 0;
  transition: all 0.3s ease;
  background: white;
}

.checkbox-custom {
  border-radius: 4px;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
  display: none;
}

.radio-option input[type="radio"]:checked + .radio-custom {
  border-color: #4f46e5;
  background: white;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #4f46e5;
  border-radius: 50%;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom {
  border-color: #4f46e5;
  background: #4f46e5;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-custom::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.option-content {
  flex: 1;
}

.option-content strong {
  display: block;
  font-size: 1.1em;
  margin-bottom: 5px;
  color: #1f2937;
}

.option-content small {
  color: #6b7280;
  font-size: 0.9em;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #374151;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  color: #1f2937;
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  color: #1f2937;
  font-size: 16px;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  cursor: pointer;
}

.form-group select option {
  background: white;
  color: #1f2937;
  padding: 10px;
  font-size: 16px;
}

.form-group select:invalid {
  color: #9ca3af;
}

.form-group select:valid {
  color: #1f2937;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

.form-group textarea::placeholder {
  color: #9ca3af;
}

.form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.btn-primary,
.btn-secondary {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3730a3, #6d28d9);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.result-content {
  text-align: center;
  padding: 40px 20px;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f4f6;
  border-left: 4px solid #4f46e5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.success-icon {
  font-size: 4em;
  margin-bottom: 20px;
  color: #10b981;
}

.price-result {
  background: #f0f9ff;
  border: 2px solid #4f46e5;
  border-radius: 12px;
  padding: 30px;
  margin: 30px 0;
}

.final-price {
  font-size: 2.5em;
  font-weight: bold;
  color: #4f46e5;
  margin-top: 10px;
}

/* Knapp för att öppna kalkylatorn */
.open-price-calculator {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.open-price-calculator:hover {
  background: linear-gradient(135deg, #3730a3, #6d28d9);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
  color: white;
  text-decoration: none;
}

/* Error states */
.form-group input.error,
.form-group select.error {
  border-color: #ef4444;
  background: #fef2f2;
}

/* Responsiv design */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 5% auto;
    border-radius: 15px;
  }

  .modal-header {
    padding: 30px 20px 25px;
  }

  .modal-header h2 {
    font-size: 1.5em;
  }

  #price-calculator-form {
    padding: 20px;
  }

  .form-step {
    min-height: 250px;
  }

  .radio-option,
  .checkbox-option {
    padding: 15px;
  }

  .form-navigation {
    flex-direction: column;
    gap: 15px;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Förhindra zoom på iOS */
  }
}

/* Modal open state */
body.modal-open {
  overflow: hidden;
}
