/* Quote Modal Styles */

/* Modal Overlay */
.quote-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.quote-modal.active {
  display: flex;
  opacity: 1;
}

.quote-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(165, 145, 130, 0.55);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

/* Modal Content Container */
.quote-modal-content {
  position: relative;
  background: var(--white);
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(165, 145, 130, 0.22);
  z-index: 10000;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Close Button */
.quote-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 32px;
  color: var(--text-light);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 10001;
}

.quote-modal-close:hover {
  background: var(--light-gray);
  color: var(--text-dark);
  transform: rotate(90deg);
}

/* Modal Body */
.quote-modal-body {
  padding: 40px;
}

.quote-modal-body h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.quote-modal-subtitle {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 30px;
}

/* Form Styles */
.quote-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group .required {
  color: #e74c3c;
  margin-left: 2px;
}

.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text-dark);
  transition: all 0.3s ease;
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(180, 220, 180, 0.25);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Error States */
.form-group input.error,
.form-group textarea.error {
  border-color: #e74c3c;
  background-color: #fff5f5;
}

.form-group input.error:focus,
.form-group textarea.error:focus {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group .error-message {
  font-size: 13px;
  color: #e74c3c;
  margin-top: 4px;
  display: none;
  align-items: center;
  gap: 6px;
  animation: slideDown 0.2s ease;
}

.form-group .error-message::before {
  content: '⚠';
  font-size: 14px;
  flex-shrink: 0;
}

.form-group .error-message.active {
  display: flex;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.form-actions button {
  flex: 1;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-secondary {
  background: var(--light-gray);
  color: var(--text-dark);
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn-primary2 {
  background: var(--primary-green);
  color: var(--white);
  position: relative;
}

.btn-primary2:hover:not(:disabled) {
  background: var(--dark-green);
  /* transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(20, 77, 54, 0.3); */
}

.btn-primary2:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Loading State */
.btn-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary2.loading .btn-text {
  display: none;
}

.btn-primary2.loading .btn-loading {
  display: flex;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Success Message */
.quote-success-message {
  text-align: center;
  padding: 40px 20px;
  display: none;
}

.quote-success-message.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: #27ae60;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--white);
  margin: 0 auto 20px;
  animation: scaleIn 0.5s ease;
}

.quote-success-message h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.quote-success-message p {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.6;
}

/* Error Message */
.quote-error-message {
  text-align: center;
  padding: 40px 20px;
  display: none;
}

.quote-error-message.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.error-icon {
  width: 80px;
  height: 80px;
  background: #e74c3c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--white);
  margin: 0 auto 20px;
  animation: scaleIn 0.5s ease;
}

.quote-error-message h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.quote-error-message .error-text {
  font-size: 16px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 20px;
}

.quote-error-message .btn-primary2 {
  display: inline-block;
  padding: 12px 32px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* Body Scroll Lock */
body.modal-open {
  overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
  .quote-modal-content {
    width: 95%;
    max-height: 95vh;
    border-radius: 8px;
  }

  .quote-modal-body {
    padding: 30px 20px;
  }

  .quote-modal-body h2 {
    font-size: 26px;
  }

  .quote-modal-subtitle {
    font-size: 14px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }

  .quote-modal-close {
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .quote-modal-content {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .quote-modal-body {
    padding: 25px 15px;
  }

  .quote-modal-body h2 {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .quote-modal-subtitle {
    font-size: 13px;
    margin-bottom: 25px;
  }

  .form-group {
    gap: 6px;
  }

  .form-group label {
    font-size: 13px;
  }

  .form-group input,
  .form-group textarea {
    padding: 10px 14px;
    font-size: 14px;
  }

  .form-group textarea {
    min-height: 100px;
  }

  .form-actions button {
    padding: 12px 20px;
    font-size: 15px;
  }

  .success-icon,
  .error-icon {
    width: 60px;
    height: 60px;
    font-size: 36px;
  }

  .quote-success-message h3,
  .quote-error-message h3 {
    font-size: 22px;
  }

  .quote-success-message p,
  .quote-error-message .error-text {
    font-size: 14px;
  }
}

/* Accessibility */
.quote-modal:focus-visible {
  outline: none;
}

.quote-modal-content:focus {
  outline: 2px solid var(--primary-green);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .form-group input,
  .form-group textarea {
    border-width: 3px;
  }

  .quote-modal-overlay {
    background: rgba(165, 145, 130, 0.8);
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .quote-modal,
  .quote-modal-content,
  .quote-modal-close,
  .btn-primary2,
  .form-group input,
  .form-group textarea {
    transition: none;
    animation: none;
  }

  .quote-modal.active {
    opacity: 1;
  }
}
