/* Quote engine styles — matches FlowStack theme */

.quote-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--light);
  padding-bottom: 0;
}

.quote-header {
  background: var(--navy);
  width: 100%;
  text-align: center;
  padding: 64px 24px 56px;
}

.quote-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}

.quote-headline {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.quote-sub {
  font-size: 16px;
  font-weight: 300;
  color: var(--text-light);
}

/* Form */
.quote-form-wrapper {
  background: #fff;
  border: 1px solid rgba(11,30,61,0.1);
  border-top: 3px solid var(--amber);
  padding: 40px 40px 32px;
  width: 100%;
  max-width: 680px;
  margin: -28px 24px 48px;
  box-shadow: 0 4px 32px rgba(11,30,61,0.08);
}

.quote-form { width: 100%; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group--full { width: 100%; }

.form-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-mid);
}

.form-input,
.form-select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-dark);
  background: var(--light);
  border: 1.5px solid transparent;
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  outline: none;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-dim);
  background: #fff;
}

.form-input::placeholder { color: var(--text-mid); opacity: 0.5; }

.select-wrapper {
  position: relative;
}

.select-wrapper select { width: 100%; padding-right: 36px; cursor: pointer; }

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-mid);
  pointer-events: none;
}

/* Mode selector */
.mode-selector {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.mode-option { flex: 1; min-width: 120px; cursor: pointer; }

.mode-option input { display: none; }

.mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 12px;
  border: 2px solid rgba(11,30,61,0.12);
  border-radius: 8px;
  background: var(--light);
  transition: border-color 0.2s, background 0.2s;
  color: var(--text-mid);
}

.mode-option:hover .mode-card { border-color: rgba(11,30,61,0.25); }

.mode-option input:checked + .mode-card {
  border-color: var(--amber);
  background: var(--amber-dim);
  color: var(--navy);
}

.mode-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: inherit;
}

.mode-desc {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-mid);
  text-align: center;
}

.mode-option input:checked + .mode-card .mode-desc { color: var(--steel); }

/* Submit button */
.btn-quote {
  width: 100%;
  height: 52px;
  background: var(--amber);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, transform 0.1s;
}

.btn-quote:hover { background: #e08c0a; }
.btn-quote:active { transform: scale(0.99); }
.btn-quote:disabled { opacity: 0.6; cursor: not-allowed; }

.spinner-icon { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Error */
.error-message {
  max-width: 680px;
  width: calc(100% - 48px);
  margin: 0 24px 24px;
  padding: 14px 18px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  color: #dc2626;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Results */
.results-section {
  width: 100%;
  max-width: 880px;
  padding: 0 24px 80px;
}

.results-header { margin-bottom: 28px; }

.results-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.results-sub {
  font-size: 14px;
  color: var(--text-mid);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.quote-card {
  background: #fff;
  border: 1.5px solid rgba(11,30,61,0.1);
  border-radius: 12px;
  padding: 28px 24px 24px;
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}

.quote-card:hover {
  box-shadow: 0 4px 24px rgba(11,30,61,0.1);
  transform: translateY(-2px);
}

.quote-card--top {
  border-color: var(--amber);
  box-shadow: 0 4px 16px rgba(245,158,11,0.12);
}

.quote-card-badge {
  position: absolute;
  top: -1px;
  right: 20px;
  background: var(--amber);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 10px;
  border-radius: 0 0 6px 6px;
}

.quote-card-header { margin-bottom: 16px; }

.quote-card-carrier {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.quote-card-mode {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-mid);
  letter-spacing: 0.5px;
}

.quote-card-price {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 8px;
}

.quote-card-transit {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 6px;
}

.quote-card-transit svg { color: var(--amber); flex-shrink: 0; }

.quote-card-weight {
  font-size: 12px;
  color: var(--text-mid);
  margin-bottom: 16px;
}

.quote-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.feature-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--steel);
  background: rgba(30,58,95,0.08);
  border-radius: 4px;
  padding: 4px 8px;
}

.btn-book {
  display: block;
  width: 100%;
  height: 44px;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  line-height: 44px;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s;
}

.btn-book:hover { background: var(--steel); }

/* Booking modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-panel {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h2 { margin: 0; font-size: 22px; }

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-mid);
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}
.modal-close:hover { color: var(--text); }

.modal-shipment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.shipment-pill {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--text-mid);
}

.shipment-pill--price {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  border-color: var(--navy);
}

.bf-error {
  color: #c0392b;
  background: #fdf0ef;
  border: 1px solid #e8c5c2;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 16px;
}

.btn-book-submit {
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-book-submit:hover:not(:disabled) { background: var(--navy); }
.btn-book-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.modal-success {
  text-align: center;
  padding: 12px 0;
}

.success-icon {
  color: var(--accent);
  margin-bottom: 16px;
}

.modal-success h2 {
  font-size: 26px;
  margin: 0 0 8px;
  color: var(--text);
}

.success-ref {
  font-size: 18px;
  color: var(--text-mid);
  margin: 0 0 16px;
}

.success-message {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.6;
  margin: 0 0 28px;
}

.btn-modal-close {
  background: var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  padding: 12px 32px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.form-label .required { color: var(--accent); }
.form-label .optional { color: var(--text-mid); font-size: 12px; font-weight: 400; }
.form-textarea { resize: vertical; }

/* Responsive */
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .quote-form-wrapper { padding: 28px 20px 24px; }
  .mode-selector { flex-direction: column; }
  .results-grid { grid-template-columns: 1fr; }
  .quote-card-price { font-size: 30px; }
}