/* ==========================================================================
   Vernotec - Simple Off-White Quote Modal
   Compact, No-Scroll Design
   ========================================================================== */

:root {
  --modal-bg: #fdfdfd;
  --text-primary: #1e293b;
  --accent-blue: #2563eb;
  --border-muted: #e2e8f0;
}

/* Modal Overlay */
.quote-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

/* Modal Box - Optimized for Single Window (No Scroll) */
.quote-modal-box {
  background: var(--modal-bg);
  width: 100%;
  max-width: 750px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  position: relative;
  max-height: 95vh;
  overflow: hidden; /* Avoid main scroll */
  padding: 30px;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.quote-modal-overlay.active .quote-modal-box {
  transform: translateY(0);
}

/* Close Button */
.quote-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
}

.quote-modal-close:hover {
  color: #ef4444;
}

/* Header - More Compact */
.modal-form-header {
  text-align: center;
  margin-bottom: 25px;
}

.modal-form-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--text-primary);
}

.modal-form-header p {
  color: #64748b;
  font-size: 0.9rem;
}

/* Form Styles - Multi-column to fit space */
.quote-modal-form .form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

@media (max-width: 768px) {
  .quote-modal-form .form-grid {
    grid-template-columns: 1fr 1fr;
    max-height: 60vh;
    overflow-y: auto;
  }
}

.quote-modal-form .form-group {
  margin-bottom: 12px;
}

.quote-modal-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
  color: #475569;
  font-size: 0.8rem;
}

.quote-modal-form input,
.quote-modal-form select,
.quote-modal-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-muted);
  background: #fff;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: 0.2s;
}

.quote-modal-form input:focus,
.quote-modal-form select:focus,
.quote-modal-form textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group-full {
  grid-column: span 3;
}

@media (max-width: 768px) {
  .form-group-full {
    grid-column: span 2;
  }
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 10px;
}

.submit-btn:hover {
  background: #1d4ed8;
}

/* Status Messages */
#modalStatus {
  margin-top: 10px;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
  font-size: 0.85rem;
  display: none;
}

#modalStatus.success {
  display: block;
  background: #dcfce7;
  color: #166534;
}

#modalStatus.error {
  display: block;
  background: #fee2e2;
  color: #991b1b;
}
