/**
 * Get a Quote - Frontend Form Stylesheet
 */

:root {
  --gaq-primary: #D9232D;
  --gaq-primary-hover: #B31B24;
  --gaq-btn-text: #ffffff;
  --gaq-card-bg: #ffffff;
  --gaq-text: #2B2B31;
  --gaq-mute: #6A6A74;
  --gaq-border: #E2E2E8;
  --gaq-error: #e74c3c;
  --gaq-success: #27ae60;
}

.gaq-wrapper {
  box-sizing: border-box;
  font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  width: 100%;
  padding: 10px 0;
  display: flex;
  justify-content: center;
}

.gaq-wrapper *,
.gaq-wrapper *::before,
.gaq-wrapper *::after {
  box-sizing: border-box;
}

/* Form Card */
.gaq-card {
  background: var(--gaq-card-bg, #ffffff);
  color: var(--gaq-text, #2B2B31);
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  border-radius: 8px;
  padding: 28px;
  text-align: left;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--gaq-border, #E2E2E8);
  position: relative;
}

.gaq-card h3 {
  font-family: Montserrat, sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--gaq-text, #2B2B31);
  margin: 0 0 6px;
  line-height: 1.25;
}

.gaq-card p.sub {
  color: var(--gaq-mute, #6A6A74);
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.4;
}

/* Steps */
.gaq-card .step {
  display: none;
}

.gaq-card .step.show {
  display: block;
  animation: gaqFadeIn 0.3s ease-out;
}

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

/* Grids */
.gaq-card .fr {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.gaq-card .f2 {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.gaq-card .f3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

/* Form Fields */
.gaq-field {
  position: relative;
  display: flex;
  flex-direction: column;
}

.gaq-field label {
  display: block;
  font-family: Montserrat, sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--gaq-text, #2B2B31);
  margin: 0 0 6px;
}

.gaq-field input,
.gaq-field select {
  width: 100%;
  height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--gaq-border, #E2E2E8);
  border-radius: 4px;
  background: #ffffff;
  color: var(--gaq-text, #2B2B31);
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.gaq-field input:focus,
.gaq-field select:focus {
  border-color: var(--gaq-primary, #D9232D);
  box-shadow: 0 0 0 2px rgba(217, 35, 45, 0.15);
}

.gaq-field input.gaq-invalid,
.gaq-field select.gaq-invalid {
  border-color: var(--gaq-error) !important;
  background-color: #fff8f8;
}

.gaq-error-tip {
  color: var(--gaq-error);
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
  min-height: 14px;
  display: none;
}

.gaq-field.has-error .gaq-error-tip {
  display: block;
}

/* Buttons */
.gaq-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  background: var(--gaq-primary, #D9232D);
  color: var(--gaq-btn-text, #ffffff) !important;
  border: 0;
  border-radius: 4px;
  padding: 0 26px;
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.gaq-card .btn:hover {
  background: var(--gaq-primary-hover, #B31B24);
}

.gaq-card .btn:active {
  transform: translateY(1px);
}

.gaq-card .btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.gaq-card .btn.loading {
  position: relative;
  color: transparent !important;
}

.gaq-card .btn.loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--gaq-btn-text, #ffffff);
  border-radius: 50%;
  border-top-color: transparent;
  animation: gaqSpin 0.6s linear infinite;
}

@keyframes gaqSpin {
  to { transform: rotate(360deg); }
}

.gaq-card .or {
  text-align: center;
  margin: 14px 0 0;
  color: var(--gaq-mute, #6A6A74);
  font-size: 14px;
}

.gaq-card .or a {
  color: var(--gaq-primary, #D9232D);
  font-weight: 700;
  text-decoration: none;
}

.gaq-card .or a:hover {
  text-decoration: underline;
}

.gaq-card .back {
  background: none;
  border: 0;
  color: var(--gaq-mute, #6A6A74);
  cursor: pointer;
  margin-top: 14px;
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  display: inline-block;
  transition: color 0.2s;
}

.gaq-card .back:hover {
  color: var(--gaq-primary, #D9232D);
}

/* Success / Done State */
.gaq-card .done {
  text-align: center;
  padding: 30px 15px;
}

.gaq-check-icon {
  width: 64px;
  height: 64px;
  background: #e8f5e9;
  color: var(--gaq-success);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  animation: gaqPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes gaqPop {
  0% { transform: scale(0.3); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.gaq-card .done h3 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--gaq-text, #2B2B31);
}

.gaq-card .done p.sub {
  font-size: 16px;
  color: var(--gaq-mute, #6A6A74);
  max-width: 520px;
  margin: 0 auto;
}

/* Form Alert */
.gaq-form-alert {
  margin-top: 15px;
  padding: 10px 14px;
  background: #fff3f3;
  color: var(--gaq-error);
  border: 1px solid #ffcdd2;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

/* Mobile Floating Sticky Bar (Matching Brightline Movers) */
.gaq-mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gaq-primary, #D9232D);
  color: var(--gaq-btn-text, #ffffff) !important;
  text-align: center;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  font-family: Montserrat, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s;
  pointer-events: none;
}

@media (max-width: 768px) {
  .gaq-card {
    padding: 20px;
  }
  .gaq-card .fr,
  .gaq-card .f2,
  .gaq-card .f3 {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .gaq-card .btn {
    width: 100%;
    margin-top: 6px;
  }
  .gaq-mobile-bar.is-visible {
    transform: translateY(0);
    pointer-events: auto;
  }
}

@media (min-width: 769px) {
  .gaq-mobile-bar {
    display: none !important;
  }
}
