/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@import url("/assets/main-ab3c2ada.css");

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Prevent body scrolling when modal is open */
body.modal-open {
  overflow: hidden;
}

/* Modal Container */
.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

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

/* Modal Header */
.modal-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-light);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease;
}

.modal-close:hover {
  background: var(--color-background-light);
  color: var(--color-text);
}

/* Modal Body */
.modal-body {
  padding: 2rem;
}

.modal-body .inquiry-form {
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
  margin-top: 0;
}

/* Modal Footer */
.modal-footer {
  padding: 1rem 2rem 2rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.modal-footer .btn {
  min-width: 100px;
}

/* Form Styles within Modal */
.modal-body .form-group {
  margin-bottom: 1.5rem;
}

.modal-body .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.modal-body .form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
  gap: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal {
    width: 95%;
    max-height: 95vh;
    margin: 1rem;
  }
  
  .modal-header {
    padding: 1.5rem 1.5rem 1rem;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .modal-footer {
    padding: 1rem 1.5rem 1.5rem;
  }
  
  .modal-body .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .modal-body .form-actions {
    flex-direction: column;
  }
  
  .modal-body .form-actions .btn {
    width: 100%;
  }
}

/* Animation for form submission */
.modal-body .form-loading {
  opacity: 0.6;
  pointer-events: none;
}

.modal-body .form-loading .btn {
  position: relative;
}

.modal-body .form-loading .btn:after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Accessibility */
.modal-overlay[aria-hidden="true"] {
  pointer-events: none;
}

.modal-overlay[aria-hidden="false"] {
  pointer-events: auto;
}

/* Focus styles */
.modal-close:focus,
.modal .form-input:focus,
.modal .form-select:focus,
.modal .form-textarea:focus,
.modal .btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Modal specific form styling */
.modal .form-select {
  height: 44px;
  line-height: 42px;
  padding-top: 0;
  padding-bottom: 0;
  vertical-align: middle;
}

/* Error states */
.modal-body .form-group.error .form-input,
.modal-body .form-group.error .form-select,
.modal-body .form-group.error .form-textarea {
  border-color: #dc3545;
}

.modal-body .form-group.error .form-label {
  color: #dc3545;
}

.modal-body .error-message {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
} 