/* ================================================
   LOGISTICS QUOTE FORM – FRONTEND STYLES
   ================================================ */

:root {
  --lqf-navy:       #0f2744;
  --lqf-blue:       #1a4a8a;
  --lqf-accent:     #2d7dd2;
  --lqf-accent-h:   #1a5fa8;
  --lqf-light:      #e8f1fb;
  --lqf-mid:        #c5dcf5;
  --lqf-text:       #1e2a38;
  --lqf-muted:      #4a5a6e;
  --lqf-border:     #d0dff0;
  --lqf-bg:         #f7fafd;
  --lqf-white:      #ffffff;
  --lqf-success:    #22c55e;
  --lqf-error:      #ef4444;
  --lqf-radius:     12px;
  --lqf-shadow:     0 8px 40px rgba(15,39,68,.12);
}

.lqf-wrap * { box-sizing: border-box; }

.lqf-wrap {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--lqf-text);
  max-width: 860px;
  margin: 0 auto;
}

/* ---- FORM CONTAINER ---- */
.lqf-form-container {
  background: var(--lqf-white);
  border-radius: var(--lqf-radius);
  box-shadow: var(--lqf-shadow);
  overflow: hidden;
}

/* ---- HEADER ---- */
.lqf-form-header {
  background: linear-gradient(135deg, var(--lqf-navy) 0%, var(--lqf-blue) 100%);
  padding: 28px 36px;
  display: flex;
  align-items: center;
  gap: 20px;
  color: #fff;
}
.lqf-header-icon {
  width: 60px; height: 60px;
  background: rgba(255,255,255,.12);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.lqf-form-header h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
}
.lqf-form-header p {
  margin: 0;
  font-size: 14px;
  opacity: .8;
}

/* ---- PROGRESS ---- */
.lqf-progress {
  padding: 20px 36px;
  background: var(--lqf-bg);
  border-bottom: 1px solid var(--lqf-border);
}
.lqf-progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
}
.lqf-step {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
  transition: all .3s;
}
.lqf-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--lqf-mid);
  color: var(--lqf-muted);
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: all .3s;
}
.lqf-step-label {
  font-size: 13px;
  color: var(--lqf-muted);
  font-weight: 500;
  transition: color .3s;
}
.lqf-step.active .lqf-step-num {
  background: var(--lqf-accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(45,125,210,.2);
}
.lqf-step.active .lqf-step-label { color: var(--lqf-accent); font-weight: 700; }
.lqf-step.done .lqf-step-num {
  background: var(--lqf-success);
  color: #fff;
}
.lqf-step.done .lqf-step-label { color: var(--lqf-success); }
.lqf-step-line {
  flex: 1;
  height: 2px;
  background: var(--lqf-border);
  margin: 0 10px;
}

/* ---- FORM STEPS ---- */
.lqf-form-step {
  display: none;
  padding: 32px 36px;
  animation: lqfFadeIn .3s ease;
}
.lqf-form-step.active { display: block; }

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

.lqf-step-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--lqf-navy);
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lqf-step-title span {
  background: var(--lqf-light);
  color: var(--lqf-accent);
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

/* ---- GRIDS ---- */
.lqf-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lqf-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

@media (max-width: 640px) {
  .lqf-grid-2, .lqf-grid-3 { grid-template-columns: 1fr; }
  .lqf-form-step { padding: 24px 20px; }
  .lqf-form-header { padding: 20px; flex-direction: column; text-align: center; }
  .lqf-progress { padding: 16px 20px; }
}

/* ---- FIELDS ---- */
.lqf-field { display: flex; flex-direction: column; }
.lqf-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--lqf-navy);
  margin-bottom: 7px;
}
.lqf-req { color: var(--lqf-error); margin-left: 2px; }

.lqf-input-wrap {
  position: relative;
}
.lqf-input-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  stroke: var(--lqf-muted);
  pointer-events: none;
  transition: stroke .2s;
}
.lqf-input-wrap input,
.lqf-input-wrap select {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1.5px solid var(--lqf-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--lqf-text);
  background: var(--lqf-white);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  -webkit-appearance: none;
}
.lqf-input-wrap input:focus,
.lqf-input-wrap select:focus {
  border-color: var(--lqf-accent);
  box-shadow: 0 0 0 3px rgba(45,125,210,.12);
}
.lqf-input-wrap input:focus ~ .lqf-input-icon,
.lqf-input-wrap:focus-within .lqf-input-icon {
  stroke: var(--lqf-accent);
}
.lqf-input-wrap input.lqf-invalid,
.lqf-input-wrap select.lqf-invalid {
  border-color: var(--lqf-error);
}

.lqf-select-wrap::after {
  content: '';
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--lqf-muted);
  pointer-events: none;
}

textarea#lqf_notes {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--lqf-border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--lqf-text);
  resize: vertical;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  margin-top: 20px;
}
textarea#lqf_notes:focus {
  border-color: var(--lqf-accent);
  box-shadow: 0 0 0 3px rgba(45,125,210,.12);
}

/* ---- SUMMARY ---- */
.lqf-summary {
  background: var(--lqf-light);
  border: 1px solid var(--lqf-mid);
  border-radius: 10px;
  padding: 18px 20px;
  margin-top: 20px;
}
.lqf-summary h4 {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--lqf-navy);
  font-weight: 700;
}
.lqf-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.lqf-summary-grid div {
  font-size: 13px;
  display: flex;
  gap: 6px;
  align-items: baseline;
}
.lqf-summary-grid span { color: var(--lqf-muted); white-space: nowrap; }
.lqf-summary-grid strong { color: var(--lqf-navy); word-break: break-word; }

/* ---- NAV ---- */
.lqf-nav-wrap { margin-top: 28px; display: flex; justify-content: flex-end; }
.lqf-nav-between { justify-content: space-between; }

/* ---- BUTTONS ---- */
.lqf-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
}
.lqf-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.lqf-btn-next, .lqf-btn-submit {
  background: linear-gradient(135deg, var(--lqf-navy), var(--lqf-blue));
  color: #fff;
  box-shadow: 0 4px 14px rgba(15,39,68,.25);
}
.lqf-btn-next:hover, .lqf-btn-submit:hover {
  background: linear-gradient(135deg, var(--lqf-blue), var(--lqf-accent-h));
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15,39,68,.3);
}
.lqf-btn-submit { padding: 14px 32px; font-size: 15px; }

.lqf-btn-back {
  background: var(--lqf-bg);
  color: var(--lqf-muted);
  border: 1.5px solid var(--lqf-border);
}
.lqf-btn-back:hover { background: var(--lqf-light); color: var(--lqf-navy); }

.lqf-btn-outline {
  background: transparent;
  color: var(--lqf-accent);
  border: 2px solid var(--lqf-accent);
  margin-top: 20px;
}
.lqf-btn-outline:hover { background: var(--lqf-accent); color: #fff; }

.lqf-btn-submit:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
}

/* ---- LOADING SPINNER ---- */
.lqf-spin {
  animation: lqf-rotate 1s linear infinite;
}
@keyframes lqf-rotate {
  to { transform: rotate(360deg); }
}

/* ---- ERROR BOX ---- */
.lqf-error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid var(--lqf-error);
  border-radius: 8px;
  padding: 14px 18px;
  color: #b91c1c;
  font-size: 14px;
  margin-bottom: 20px;
}

/* ---- SUCCESS STATE ---- */
.lqf-success {
  background: var(--lqf-white);
  border-radius: var(--lqf-radius);
  box-shadow: var(--lqf-shadow);
}
.lqf-success-inner {
  padding: 60px 40px;
  text-align: center;
}
.lqf-success-icon {
  width: 80px; height: 80px;
  margin: 0 auto 24px;
  animation: lqfBounceIn .6s cubic-bezier(.36,.07,.19,.97);
}
.lqf-success-icon svg { width: 80px; height: 80px; }
.lqf-success h2 {
  font-size: 26px;
  color: var(--lqf-navy);
  margin: 0 0 12px;
}
.lqf-success p {
  font-size: 15px;
  color: var(--lqf-muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

@keyframes lqfBounceIn {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
