/* =============================================
  AUTO INSURANCE FORM - CheapRideCoverage Style
  ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;600;700;800;900&display=swap');

/* ---- RESET ---- */
#aif-wrapper a { text-decoration: none; }
#aif-wrapper ul { list-style: none; }
#aif-wrapper button { cursor: pointer; }

/* =============================================
  WRAPPER
  ============================================= */
#aif-wrapper {
   font-family: 'Urbanist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
   background: #eef1f6;
   color: #111827;
   min-height: 100vh;
   -webkit-font-smoothing: antialiased;
}

/* ---- PROGRESS BAR ---- */
#aif-progress-bar-wrap {
   width: 100%;
   height: 5px;
   background: #d1d8e6;
   position: sticky;
   top: 0;
   z-index: 100;
}
#aif-progress-bar {
   height: 100%;
   background: #1a56db;
   width: 0%;
   transition: width .5s ease;
}

/* ---- INNER ---- */
#aif-inner {
   max-width: 760px;
   margin: 0 auto;
   padding: 40px 20px 80px;
}

/* ---- BACK BUTTON ---- */
#aif-back-btn {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   background: #fff;
   border: 1.5px solid #d1d8e6;
   color: #6b7280;
   padding: 10px 20px;
   border-radius: 50px;
   font-size: 14px;
   font-weight: 600;
   font-family: inherit;
   margin-bottom: 28px;
   transition: all .2s;
   box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
#aif-back-btn:hover {
   border-color: #1a56db;
   color: #1a56db;
   box-shadow: 0 2px 8px rgba(26,86,219,.15);
}

/* =============================================
  STEP VISIBILITY
  ============================================= */
.aif-step { display: none; }
.aif-step.active {
   display: block;
   animation: aifFadeUp .3s ease;
}
@keyframes aifFadeUp {
   from { opacity: 0; transform: translateY(18px); }
   to   { opacity: 1; transform: translateY(0); }
}

/* =============================================
  STEP HEADER
  ============================================= */
.aif-step-header {
   text-align: center;
   margin-bottom: 20px;
}
.aif-step-header h1 {
   font-size: clamp(24px, 4vw, 36px);
   font-weight: 900;
   color: #111827;
   line-height: 1.2;
   margin-bottom: 8px;
   letter-spacing: -.3px;
}
.aif-subhead {
   font-size: 15px;
   color: #6b7280;
   font-weight: 500;
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 6px;
}
.aif-state-banner {
   display: inline-block;
   font-size: 14px;
   font-weight: 700;
   color: #1a56db;
   background: #eff6ff;
   padding: 6px 18px;
   border-radius: 50px;
   margin-bottom: 12px;
   border: 1px solid #bfdbfe;
}

/* =============================================
  CARD
  ============================================= */
.aif-card {
   background: #fff;
   border-radius: 18px;
   padding: 36px 32px;
   box-shadow: 0 2px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
   border: 1px solid #e8edf5;
}

/* ---- ZIP CARD ---- */
.aif-zip-card {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 18px;
   padding: 48px 40px;
}
.aif-zip-card label {
   display: flex;
   align-items: center;
   gap: 8px;
   font-size: 22px;
   font-weight: 800;
   color: #111827;
}
.aif-zip-card label svg { color: #1a56db; flex-shrink: 0; }

.aif-zip-card #aif-zip-input {
   width: 100%;
   max-width: 360px;
   text-align: center;
   font-size: 32px;
   font-weight: 800;
   letter-spacing: 6px;
   height: 72px;
   border: 2px solid #d1d8e6;
   border-radius: 14px;
   outline: none;
   font-family: inherit;
   color: #111827;
   transition: border-color .2s, box-shadow .2s;
   background: #f9fafb;
}
.aif-zip-card #aif-zip-input:focus {
   border-color: #1a56db;
   background: #fff;
   box-shadow: 0 0 0 4px rgba(26,86,219,.10);
}
.aif-zip-card #aif-zip-input::placeholder {
   color: #9ca3af;
   font-size: 20px;
   letter-spacing: 0;
   font-weight: 500;
}

/* =============================================
  OPTION BUTTON GRIDS
  ============================================= */
.aif-btn-grid {
   display: grid;
   gap: 12px;
}
.aif-two-col      { grid-template-columns: 1fr 1fr; }
.aif-year-grid    { grid-template-columns: repeat(4, 1fr); }
.aif-make-grid    { grid-template-columns: repeat(3, 1fr); }
.aif-model-grid   { grid-template-columns: repeat(3, 1fr); }

/* ---- OPTION BUTTON ---- */
.aif-opt-btn {
   display: flex;
   align-items: center;
   justify-content: center;
   padding: 0 14px;
   height: 62px;
   background: #fff;
   border: 2px solid #d1d8e6;
   border-radius: 12px;
   font-size: 16px;
   font-weight: 700;
   font-family: inherit;
   color: #111827;
   transition: all .18s cubic-bezier(.4,0,.2,1);
   line-height: 1.3;
   text-align: center;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
}
/* year/make/model buttons can be a bit shorter */
.aif-year-grid .aif-opt-btn,
.aif-make-grid .aif-opt-btn,
.aif-model-grid .aif-opt-btn {
   height: 56px;
   font-size: 15px;
}

.aif-opt-btn:hover {
   border-color: #1a56db;
   background: #eff6ff;
   color: #1a56db;
   transform: translateY(-2px);
   box-shadow: 0 4px 14px rgba(26,86,219,.14);
}
.aif-opt-btn.selected {
   background: #1a56db;
   border-color: #1a56db;
   color: #fff;
   transform: translateY(-1px);
   box-shadow: 0 4px 16px rgba(26,86,219,.35);
}
.aif-opt-btn.selected:hover {
   background: #1648c4;
   border-color: #1648c4;
}

.aif-big-label {
   font-size: 22px;
   font-weight: 900;
}

/* Prior years dropdown inside card */
.aif-prior-years-wrap { margin-top: 14px; }

/* Loading */
.aif-loading {
   grid-column: 1 / -1;
   text-align: center;
   padding: 40px 0;
   color: #9ca3af;
   font-size: 15px;
   font-weight: 600;
}

/* =============================================
  QUESTION LABEL
  ============================================= */
.aif-question-label {
   font-size: 16px;
   font-weight: 800;
   color: #111827;
   margin-bottom: 10px;
}

/* =============================================
  FORM FIELDS
  ============================================= */
.aif-field-wrap { margin-bottom: 16px; }
.aif-field-wrap label {
   display: block;
   font-size: 12px;
   font-weight: 800;
   color: #6b7280;
   text-transform: uppercase;
   letter-spacing: .7px;
   margin-bottom: 6px;
}
.aif-input,
.aif-select {
   width: 100%;
   height: 54px;
   padding: 0 16px;
   border: 2px solid #d1d8e6;
   border-radius: 12px;
   font-size: 16px;
   font-weight: 600;
   font-family: inherit;
   color: #111827;
   background: #f9fafb;
   outline: none;
   transition: border-color .2s, box-shadow .2s;
   -webkit-appearance: none;
   appearance: none;
}
.aif-input:focus,
.aif-select:focus {
   border-color: #1a56db;
   background: #fff;
   box-shadow: 0 0 0 3px rgba(26,86,219,.10);
}
.aif-input::placeholder { color: #9ca3af; }
.aif-select {
   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231a56db' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
   background-repeat: no-repeat;
   background-position: right 14px center;
   background-size: 18px;
   padding-right: 46px;
   cursor: pointer;
}
.aif-fields-row {
   display: grid;
   grid-template-columns: 1fr 1fr;
   gap: 14px;
}

/* =============================================
  PRIMARY BUTTON
  ============================================= */
.aif-primary-btn {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   width: 100%;
   padding: 18px 28px;
   background: #1a56db;
   color: #fff;
   border: none;
   border-radius: 12px;
   font-size: 18px;
   font-weight: 800;
   font-family: inherit;
   letter-spacing: .2px;
   box-shadow: 0 4px 18px rgba(26,86,219,.38);
   transition: all .2s;
   margin-top: 10px;
   text-decoration: none;
}
.aif-zip-card .aif-primary-btn {
   max-width: 360px;
   font-size: 19px;
   padding: 20px 32px;
}
.aif-primary-btn:hover {
   background: #1648c4;
   transform: translateY(-2px);
   box-shadow: 0 8px 24px rgba(26,86,219,.42);
}
.aif-primary-btn:active { transform: translateY(0); }
.aif-primary-btn:disabled,
.aif-primary-btn.loading {
   background: #9ca3af;
   cursor: not-allowed;
   box-shadow: none;
   transform: none;
}

/* =============================================
  DOB
  ============================================= */
.aif-dob-row {
   display: flex;
   gap: 14px;
   margin-bottom: 20px;
}
.aif-dob-field { flex: 1; }
.aif-dob-field input {
   width: 100%;
   height: 68px;
   border: 2px solid #d1d8e6;
   border-radius: 12px;
   text-align: center;
   font-size: 24px;
   font-weight: 800;
   font-family: inherit;
   color: #111827;
   background: #f9fafb;
   outline: none;
   -moz-appearance: textfield;
   transition: border-color .2s;
}
.aif-dob-field input::-webkit-outer-spin-button,
.aif-dob-field input::-webkit-inner-spin-button { -webkit-appearance: none; }
.aif-dob-field input:focus {
   border-color: #1a56db;
   background: #fff;
   box-shadow: 0 0 0 3px rgba(26,86,219,.10);
}
.aif-dob-field input::placeholder { color: #9ca3af; font-size: 18px; font-weight: 600; }
.aif-dob-label {
   display: block;
   text-align: center;
   font-size: 11px;
   font-weight: 800;
   color: #9ca3af;
   margin-top: 6px;
   text-transform: uppercase;
   letter-spacing: .7px;
}

/* =============================================
  ERROR
  ============================================= */
.aif-error {
   color: #dc2626;
   font-size: 14px;
   font-weight: 700;
   text-align: center;
   margin-bottom: 12px;
   padding: 10px;
   background: #fef2f2;
   border-radius: 8px;
}

/* =============================================
  VEHICLE CARDS
  ============================================= */
#aif-cars-view { margin-bottom: 20px; }
.aif-car-card {
   display: flex;
   justify-content: space-between;
   align-items: center;
   background: #f9fafb;
   border: 1.5px solid #e5e7eb;
   border-radius: 10px;
   padding: 14px 18px;
   margin-bottom: 10px;
   font-size: 15px;
   font-weight: 700;
   color: #374151;
}
.aif-car-delete {
   color: #dc2626;
   font-size: 13px;
   font-weight: 700;
   background: none;
   border: none;
   cursor: pointer;
   font-family: inherit;
   padding: 4px 8px;
}
.aif-car-delete:hover { text-decoration: underline; }

/* =============================================
  THANK YOU
  ============================================= */
.aif-thankyou-card { text-align: center; }
.aif-thankyou-card p {
   font-size: 17px;
   color: #6b7280;
   margin-bottom: 28px;
   line-height: 1.7;
   font-weight: 500;
}
.aif-cta-btn {
   display: inline-flex;
   max-width: 380px;
   margin: 0 auto;
   font-size: 18px;
}

/* =============================================
  RESPONSIVE
  ============================================= */
@media (max-width: 640px) {
   #aif-inner { padding: 24px 14px 60px; }
   .aif-card { padding: 24px 18px; }
   .aif-zip-card { padding: 36px 20px; }
   .aif-zip-card label { font-size: 18px; }
   .aif-zip-card #aif-zip-input { font-size: 26px; height: 64px; }
   .aif-zip-card .aif-primary-btn { max-width: 100%; }
   .aif-year-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
   .aif-make-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
   .aif-model-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
   .aif-two-col { grid-template-columns: 1fr 1fr; gap: 10px; }
   .aif-opt-btn { height: 54px; font-size: 14px; }
   .aif-year-grid .aif-opt-btn,
   .aif-make-grid .aif-opt-btn,
   .aif-model-grid .aif-opt-btn { height: 50px; font-size: 14px; }
   .aif-step-header h1 { font-size: 22px; }
   .aif-fields-row { grid-template-columns: 1fr; }
   .aif-dob-row { gap: 10px; }
   .aif-dob-field input { font-size: 20px; height: 58px; }
   .aif-primary-btn { font-size: 16px; padding: 16px 20px; }
}

@media (max-width: 400px) {
   .aif-year-grid { grid-template-columns: repeat(3, 1fr); }
   .aif-two-col { grid-template-columns: 1fr; }
}

/* =============================================
  ASTRA / THEME OVERRIDE PROTECTION
  ============================================= */
#aif-wrapper input,
#aif-wrapper select,
#aif-wrapper button,
#aif-wrapper textarea {
   font-family: 'Urbanist', sans-serif !important;
   box-sizing: border-box !important;
   max-width: 100% !important;
   line-height: normal !important;
}
#aif-wrapper p { margin-bottom: 0 !important; }
#aif-wrapper ul { list-style: none !important; padding: 0 !important; }
#aif-wrapper a { text-decoration: none !important; }
