/* ============================================================
   AFSS — Modals, 6-Step Instant Quote Wizard & Overlays
   ============================================================ */

/* Main Overlay Shell - MUST BE HIDDEN BY DEFAULT */
.quote-modal-shell,
.quote-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(11, 29, 54, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.quote-modal-shell.is-open,
.quote-modal-overlay.is-open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Backdrop */
.quote-modal-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  cursor: pointer;
}

/* Card Container (2 Columns on Desktop) */
.quote-modal-container,
.quote-modal-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 980px;
  max-height: calc(100vh - 2.5rem);
  background: #ffffff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.45);
  animation: quoteModalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  .quote-modal-container,
  .quote-modal-card {
    flex-direction: row;
    max-height: min(850px, calc(100vh - 3.5rem));
  }
}

@keyframes quoteModalPop {
  from { transform: scale(0.96) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Left Column: Flow & Forms */
.quote-modal-left {
  position: relative;
  flex: 1 1 60%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  padding: 1.75rem 1.5rem 1.5rem;
  overflow-y: auto;
}

@media (min-width: 640px) {
  .quote-modal-left {
    padding: 2.5rem 2.25rem 2rem;
  }
}

/* Close Button */
.quote-modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f3f4f6;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.quote-modal-close-btn:hover {
  background: #e5e7eb;
  color: #111827;
  transform: scale(1.05);
}

/* Step Progress Indicator */
.quote-progress-bar-wrap {
  margin-bottom: 1.5rem;
  padding-right: 2.5rem;
}

.quote-step-label {
  color: #b0141f;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.quote-progress-segments {
  display: flex;
  gap: 6px;
}

.quote-progress-seg {
  flex: 1;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.quote-progress-seg.is-active {
  background: #b0141f;
}

/* Step Panels */
.quote-step-panel {
  display: none;
  animation: fadeInStep 0.25s ease;
}

.quote-step-panel.is-active {
  display: block;
}

@keyframes fadeInStep {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.quote-panel-title {
  font-size: 1.65rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #0b1d36;
  margin: 0 0 0.35rem 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

@media (min-width: 640px) {
  .quote-panel-title {
    font-size: 1.95rem;
  }
}

.quote-panel-subtitle {
  font-size: 0.9rem;
  color: #4b5563;
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

/* Form Fields */
.quote-form-body {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.quote-form-field {
  display: flex;
  flex-direction: column;
}

.quote-field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #111827;
  margin-bottom: 0.35rem;
  letter-spacing: 0.04em;
}

.quote-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.75rem 0.95rem;
  font-size: 0.95rem;
  color: #111827;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.quote-input:focus {
  border-color: #1c4d9c;
  box-shadow: 0 0 0 3px rgba(28, 77, 156, 0.15);
}

.quote-mobile-group {
  display: flex;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.quote-mobile-group:focus-within {
  border-color: #1c4d9c;
  box-shadow: 0 0 0 3px rgba(28, 77, 156, 0.15);
}

.quote-mobile-prefix {
  background: #f9fafb;
  border-right: 1px solid #d1d5db;
  padding: 0.75rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4b5563;
  display: flex;
  align-items: center;
}

.quote-input-mobile {
  flex: 1;
  border: none;
  padding: 0.75rem 0.95rem;
  font-size: 0.95rem;
  color: #111827;
  outline: none;
}

.quote-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Radio Cards */
.quote-radio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 500px) {
  .quote-radio-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.quote-radio-card {
  position: relative;
  cursor: pointer;
  margin: 0;
}

.quote-radio-card input {
  position: absolute;
  opacity: 0;
}

.quote-radio-box {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  transition: all 0.2s ease;
}

.quote-radio-box strong {
  font-size: 0.92rem;
  color: #0b1d36;
  margin-bottom: 0.2rem;
}

.quote-radio-box small {
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.35;
}

.quote-radio-card input:checked + .quote-radio-box {
  border-color: #1c4d9c;
  background: #f0f5fc;
  box-shadow: 0 0 0 2px rgba(28, 77, 156, 0.2);
}

/* File Upload Box */
.quote-file-upload-box {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 1.75rem 1rem;
  text-align: center;
  background: #fafafa;
  position: relative;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.quote-file-upload-box:hover {
  border-color: #1c4d9c;
  background: #f0f5fc;
}

.quote-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.quote-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: #4b5563;
  margin-top: 0.75rem;
}

.quote-checkbox-row input {
  margin-top: 0.2rem;
}

/* Action Buttons */
.quote-form-actions {
  margin-top: 1.5rem;
}

.quote-form-actions-split {
  display: flex;
  gap: 0.75rem;
}

.btn-quote-next {
  flex: 1;
  background: linear-gradient(to right, #0b1d36, #1c4d9c);
  color: #ffffff;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(11, 29, 54, 0.2);
}

.btn-quote-next:hover {
  opacity: 0.96;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(11, 29, 54, 0.28);
}

.btn-quote-back {
  background: #f3f4f6;
  color: #374151;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-quote-back:hover {
  background: #e5e7eb;
}

/* Review Summary */
.quote-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.quote-sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 0.4rem;
}

.quote-sum-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.quote-sum-row span {
  color: #64748b;
}

.quote-sum-row strong {
  color: #0b1d36;
  text-align: right;
}

/* Success State */
.quote-success-box {
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quote-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

/* Right Column: Brand Banner */
.quote-modal-right {
  display: none;
  position: relative;
  flex: 0 0 40%;
  background: #000000;
  color: #ffffff;
  padding: 2.5rem;
  overflow: hidden;
}

@media (min-width: 768px) {
  .quote-modal-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

.quote-brand-bg {
  position: absolute;
  inset: 0;
  opacity: 0.92;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(28, 77, 156, 0.65), transparent 60%),
    radial-gradient(circle at 90% 90%, rgba(11, 29, 54, 0.7), transparent 60%),
    linear-gradient(180deg, rgba(26, 26, 26, 0.85) 0%, rgba(10, 10, 10, 0.98) 100%);
}

.quote-brand-top {
  position: relative;
  z-index: 2;
}

.quote-brand-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.quote-brand-badge-bar {
  width: 4px;
  height: 24px;
  background: #b0141f;
  border-radius: 2px;
}

.quote-brand-badge-text {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffffff;
}

.quote-brand-heading {
  font-size: 2.1rem;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 1.25rem 0;
}

.quote-brand-tagline {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 1.75rem 0;
  line-height: 1.5;
}

.quote-brand-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.quote-brand-bullets li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.quote-bullet-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b0141f;
}

.quote-brand-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.25rem;
}

.quote-brand-call {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s;
}

.quote-brand-call:hover {
  color: #7aa6e6;
}
