/* ------------------------------------------------------------------ *
 * Trevin Webb Insurance - shared form styling.
 * One look for every form on the site: contact, quote and earthquake.
 * ------------------------------------------------------------------ */

.tw-form { max-width: 100%; }

.tw-form fieldset {
  border: 0;
  margin: 0 0 26px;
  padding: 0;
}
.tw-form legend {
  font: 600 13px/1.2 Inter, Arial, sans-serif;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: #B4203F;
  margin: 0 0 14px;
  padding: 0;
}

.tw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px 18px;
}
.tw-grid .tw-full { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .tw-grid { grid-template-columns: 1fr; }
}

.tw-field { display: flex; flex-direction: column; }

.tw-field label {
  font: 500 14px/1.3 Inter, Arial, sans-serif;
  color: #232B33;
  margin: 0 0 6px;
}
.tw-field .tw-req { color: #B4203F; margin-left: 2px; }

.tw-field input[type="text"],
.tw-field input[type="email"],
.tw-field input[type="tel"],
.tw-field input[type="number"],
.tw-field input[type="date"],
.tw-field select,
.tw-field textarea {
  font: 400 15px/1.45 Inter, Arial, sans-serif;
  color: #232B33;
  background: #fff;
  border: 1px solid #C9CFD7;
  border-radius: 6px;
  padding: 11px 13px;
  width: 100%;
  transition: border-color .18s ease, box-shadow .18s ease;
  -webkit-appearance: none;
  appearance: none;
}
.tw-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%235C6C7D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 18px;
  padding-right: 38px;
}
.tw-field textarea { min-height: 120px; resize: vertical; }

.tw-field input:focus,
.tw-field select:focus,
.tw-field textarea:focus {
  outline: none;
  border-color: #B4203F;
  box-shadow: 0 0 0 3px rgba(180, 32, 63, .14);
}

.tw-field .tw-hint {
  font: 400 13px/1.4 Inter, Arial, sans-serif;
  color: #5C6C7D;
  margin: 6px 0 0;
}

/* checkbox and radio groups */
.tw-choices { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.tw-choice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font: 400 15px/1.4 Inter, Arial, sans-serif;
  color: #232B33;
  cursor: pointer;
}
/* Checkboxes and radios are drawn by us rather than by the browser. The
   native control rendered its checked state as a filled square inside the
   box, which reads as a second box rather than a mark. A checkbox now shows
   an X; a radio keeps a dot, because a radio is a single choice and an X on
   one of several options is ambiguous. */
.tw-choice input {
  margin: 1px 0 0;
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex: 0 0 auto;
  -webkit-appearance: none;
          appearance: none;
  background: #fff;
  border: 1.5px solid #9AA4B2;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tw-choice input[type="radio"] { border-radius: 50%; }
.tw-choice input:hover { border-color: #B4203F; }
.tw-choice input:checked { border-color: #B4203F; }

.tw-choice input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #B4203F;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 74% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 74% no-repeat;
}
/* mask is what draws the X; without it the ::after would be a solid square,
   which is the very thing this replaced. Browsers without mask support get a
   plain X glyph instead. */
@supports not ((-webkit-mask: none) or (mask: none)) {
  .tw-choice input[type="checkbox"]:checked::after {
    background: none;
    color: #B4203F;
    content: "\00d7";
    font: 700 19px/18px Arial, sans-serif;
    text-align: center;
  }
}

.tw-choice input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #B4203F;
}

.tw-choice input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(180, 32, 63, .25);
  border-color: #B4203F;
}

/* consent block */
.tw-consent {
  background: #F6F7F9;
  border-radius: 8px;
  padding: 16px 18px;
  margin: 0 0 22px;
}
.tw-consent .tw-choice { align-items: flex-start; }
.tw-consent p {
  font: 400 12.5px/1.55 Inter, Arial, sans-serif;
  color: #5C6C7D;
  margin: 9px 0 0;
}

/* validation */
.tw-field.tw-invalid input,
.tw-field.tw-invalid select,
.tw-field.tw-invalid textarea { border-color: #B4203F; background: #FDF6F7; }
.tw-error {
  font: 500 13px/1.4 Inter, Arial, sans-serif;
  color: #B4203F;
  margin: 6px 0 0;
}

/* actions */
.tw-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.tw-submit {
  background: #B4203F;
  color: #fff;
  border: 0;
  border-radius: 30px;
  padding: 14px 34px;
  font: 600 15px/1 Inter, Arial, sans-serif;
  cursor: pointer;
  transition: background .2s ease;
}
.tw-submit:hover { background: #8E1931; }
.tw-submit:disabled { opacity: .6; cursor: default; }
.tw-alt {
  font: 400 14.5px/1.4 Inter, Arial, sans-serif;
  color: #5C6C7D;
}
.tw-alt a { color: #B4203F; font-weight: 600; }

/* status messages */
.tw-status { margin: 18px 0 0; font: 500 15px/1.5 Inter, Arial, sans-serif; }
.tw-status.tw-ok { color: #1E6B3A; }
.tw-status.tw-fail { color: #B4203F; }

/* forms sitting on a dark band keep readable labels */
.tw-form.tw-on-dark .tw-field label,
.tw-form.tw-on-dark .tw-choice { color: #fff; }
.tw-form.tw-on-dark legend { color: #E39A62; }
.tw-form.tw-on-dark .tw-consent { background: rgba(255,255,255,.08); }
.tw-form.tw-on-dark .tw-consent p { color: #D7DCE3; }
.tw-form.tw-on-dark .tw-alt { color: #D7DCE3; }
.tw-form.tw-on-dark .tw-alt a { color: #E39A62; }

/* wrapper for quote forms added to pages that had none */
.tw-quote-section { background: linear-gradient(180deg,#FBFAF7 0%,#F2E7DC 100%); padding: 64px 24px; }
.tw-quote-inner { max-width: 820px; margin: 0 auto; }
.tw-quote-inner h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.7rem, 3.2vw, 2.3rem); line-height: 1.2;
  color: #232B33; margin: 0 0 12px;
}
.tw-quote-lede { font: 400 16.5px/1.7 Inter, Arial, sans-serif; color: #4A4A4A; margin: 0 0 30px; }

/* ------------------------------------------------------------------ *
 * The form is a self-contained light card, so it stays readable no
 * matter what band it sits on. Type is pinned with !important because
 * the inherited Elementor styles otherwise override label and hint
 * sizing.
 * ------------------------------------------------------------------ */
.tw-form {
  background: #FFFFFF !important;
  border-radius: 12px;
  padding: 32px 30px 28px !important;
  box-shadow: 0 2px 18px rgba(20, 24, 31, .10);
  max-width: 100%;
}
.tw-form, .tw-form * { box-sizing: border-box; }
.tw-form .tw-field label {
  font: 500 14px/1.35 Inter, Arial, sans-serif !important;
  color: #232B33 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  margin: 0 0 6px !important;
}
.tw-form legend {
  font: 600 12.5px/1.2 Inter, Arial, sans-serif !important;
  letter-spacing: .10em !important;
  text-transform: uppercase !important;
  color: #B4203F !important;
}
.tw-form .tw-hint {
  font: 400 12.5px/1.45 Inter, Arial, sans-serif !important;
  color: #5C6C7D !important;
  margin: 6px 0 0 !important;
}
.tw-form .tw-choice {
  font: 400 14.5px/1.4 Inter, Arial, sans-serif !important;
  color: #232B33 !important;
}
.tw-form input:not([type="checkbox"]):not([type="radio"]),
.tw-form select, .tw-form textarea {
  font: 400 15px/1.45 Inter, Arial, sans-serif !important;
  color: #232B33 !important;
  height: auto !important;
  margin: 0 !important;
}
/* checkbox and radio are sized boxes we draw ourselves - height:auto would
   collapse them to a 2px sliver, which is what the reset above was doing */
.tw-form .tw-choice input[type="checkbox"],
.tw-form .tw-choice input[type="radio"] {
  width: 18px !important;
  height: 18px !important;
  margin: 1px 0 0 !important;
}
.tw-form .tw-alt {
  font: 400 14px/1.45 Inter, Arial, sans-serif !important;
  color: #5C6C7D !important;
}
.tw-form .tw-consent p {
  font: 400 12.5px/1.55 Inter, Arial, sans-serif !important;
  color: #5C6C7D !important;
}
.tw-form .tw-submit { font: 600 15px/1 Inter, Arial, sans-serif !important; }
@media (max-width: 640px) { .tw-form { padding: 22px 18px 20px !important; } }

/* ------------------------------------------------------------------ *
 * Multi-step quote wizard + simplified contact form
 * ------------------------------------------------------------------ */
.tw-form [hidden] { display: none !important; }

.tw-note {
  font: 400 14px/1.6 Inter, Arial, sans-serif !important;
  color: #4A4A4A !important;
  background: #F6F7F9;
  border-left: 3px solid #E39A62;
  border-radius: 0 6px 6px 0;
  padding: 11px 14px !important;
  margin: 0 0 22px !important;
}
.tw-note strong { color: #232B33; }

.tw-grouplabel {
  font: 500 14px/1.35 Inter, Arial, sans-serif !important;
  color: #232B33 !important;
  margin: 0 0 10px !important;
}
.tw-choicegroup { margin: 0 0 24px; }

/* business coverage is split into a general set and a trucking set, so the
   trucking lines read as a group instead of 35 undifferentiated checkboxes */
.tw-choicesub { margin: 0 0 18px; }
.tw-choicesub:last-of-type { margin-bottom: 0; }
.tw-subgrouplabel {
  font: 600 12.5px/1.3 Inter, Arial, sans-serif !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  color: #5C6C7D !important;
  margin: 0 0 9px !important;
  padding: 0 0 6px !important;
  border-bottom: 1px solid #E7EAEE !important;
}
/* a trigger can name a group (data-tw-lines="Trucking") instead of a line */
.tw-choicesub.tw-group-hi {
  background: #FDF6EF;
  box-shadow: 0 0 0 1px #E39A62;
  border-radius: 8px;
  padding: 12px 12px 10px;
  margin: 0 0 18px;
}
.tw-choicesub.tw-group-hi .tw-subgrouplabel {
  color: #232B33 !important;
  border-bottom-color: #E9C9A9 !important;
}
.tw-choices.tw-cols-3 {
  display: grid;
  /* auto-fit against the container, not the viewport - the contact page
     puts this form in a narrow column and fixed columns broke there */
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 9px 18px;
}

/* progress */
.tw-progress { margin: 0 0 26px; }
.tw-progress-track {
  height: 6px; background: #E7EAEE; border-radius: 99px; overflow: hidden;
}
.tw-progress-fill {
  height: 100%; width: 20%; background: #B4203F; border-radius: 99px;
  transition: width .32s ease;
}
.tw-progress-label {
  font: 600 12.5px/1.2 Inter, Arial, sans-serif !important;
  letter-spacing: .08em; text-transform: uppercase;
  color: #5C6C7D !important; margin: 10px 0 0 !important;
}

.tw-step-title {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 1.5rem !important; line-height: 1.25 !important;
  color: #232B33 !important; margin: 0 0 20px !important;
  text-transform: none !important;
}

/* the business sub-list revealed on step three */
.tw-sub {
  margin: 18px 0 0; padding: 18px 18px 14px;
  background: #F6F7F9; border-radius: 9px;
}

/* actions */
.tw-form .tw-actions {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 6px;
}
.tw-btn-ghost {
  background: transparent; color: #5C6C7D;
  border: 1px solid #C9CFD7; border-radius: 30px;
  padding: 13px 26px; cursor: pointer;
  font: 600 15px/1 Inter, Arial, sans-serif !important;
}
.tw-btn-ghost:hover { border-color: #5C6C7D; color: #232B33; }
.tw-form .tw-alt { flex-basis: 100%; margin: 4px 0 0 !important; }

/* review step */
.tw-summary-list { margin: 0 0 22px; }
.tw-summary-row {
  display: grid; grid-template-columns: 180px 1fr; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid #EDEFF2;
}
.tw-summary-row dt {
  font: 600 13.5px/1.45 Inter, Arial, sans-serif !important; color: #5C6C7D !important;
  margin: 0 !important;
}
.tw-summary-row dd {
  font: 400 14.5px/1.45 Inter, Arial, sans-serif !important; color: #232B33 !important;
  margin: 0 !important;
}
@media (max-width: 560px) { .tw-summary-row { grid-template-columns: 1fr; gap: 2px; } }

/* confirmation */
.tw-done-panel { text-align: center; padding: 22px 6px 8px; }
.tw-done-panel h3 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 1.55rem !important; color: #232B33 !important; margin: 0 0 12px !important;
}
.tw-done-panel p {
  font: 400 15.5px/1.65 Inter, Arial, sans-serif !important; color: #4A4A4A !important;
  margin: 0 !important;
}

/* the wizard's Continue button matches the submit button visually but is a
   separate class, so the submit-button lookup cannot pick it up by mistake */
.tw-btn-primary {
  background: #B4203F; color: #fff; border: 0; border-radius: 30px;
  padding: 14px 34px; cursor: pointer;
  font: 600 15px/1 Inter, Arial, sans-serif !important;
  transition: background .2s ease;
}
.tw-btn-primary:hover { background: #8E1931; }

/* ------------------------------------------------------------------ *
 * Spam protection
 * ------------------------------------------------------------------ */
/* honeypot: must stay reachable to bots, so it is moved off-screen
   rather than display:none, and hidden from people and screen readers */
.tw-pot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}
.tw-captcha { margin: 0 0 20px; }
.tw-captcha-q { max-width: 260px; }
.tw-captcha-q input { letter-spacing: .04em; }
.cf-turnstile, .g-recaptcha { margin: 4px 0 2px; }

/* ==================================================================== *
 * Quote dialog
 * The wizard opens over the page instead of sitting inside it, so the
 * visitor answers one screen at a time without losing their place.
 * ==================================================================== */
.tw-modal[hidden] { display: none !important; }
.tw-modal {
  position: fixed;
  inset: 0;
  z-index: 2000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.tw-modal-veil {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 31, .62);
  backdrop-filter: blur(2px);
}
body.tw-modal-on { overflow: hidden; }

.tw-modal-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(680px, 100%);
  max-height: min(88vh, 860px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(16, 20, 27, .38);
  overflow: hidden;
  animation: tw-modal-in .18s ease-out;
}
@keyframes tw-modal-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tw-modal-dialog { animation: none; }
}

.tw-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 22px;
  border-bottom: 1px solid #E7E3DC;
  background: #F8F6F1;
  flex: 0 0 auto;
}
.tw-modal-title {
  margin: 0 !important;
  font: 600 1.14rem/1.2 'Playfair Display', Georgia, serif !important;
  color: #232B33 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
.tw-modal-x {
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: #6A6F78;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
}
.tw-modal-x:hover { background: #ECE7DE; color: #232B33; }

.tw-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 22px 24px;
}

/* the form is already a white card elsewhere; inside the dialog the
   dialog is the card, so strip the doubled-up chrome */
.tw-modal-body .tw-form {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  max-width: none !important;
}

/* a line of insurance carried in from the page the visitor came from */
.tw-modal-body .tw-prefilled select {
  border-color: #E39A62 !important;
  background-color: #FDF6EF !important;
}

/* the dialog is narrower than a page column, so let the choice grids
   fall back to fewer columns rather than squeezing */
.tw-modal-body .tw-choices.tw-cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
}

.tw-modal-body .tw-actions {
  position: sticky;
  bottom: -24px;
  margin-bottom: -4px;
  padding: 14px 0 6px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 22%);
}

@media (max-width: 640px) {
  .tw-modal { padding: 0; }
  .tw-modal-dialog {
    width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }
  .tw-modal-body { padding: 16px 16px 20px; }
}

/* ---- the block that replaced the inline wizard on service pages ---- */
.tw-quote-prompt {
  padding: 54px 24px 62px;
  background: #F4EFE3;
}
.tw-quote-prompt-inner {
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
}
.tw-quote-prompt-inner h2 {
  margin: 0 0 12px !important;
  font: 600 1.7rem/1.2 'Playfair Display', Georgia, serif !important;
  color: #232B33 !important;
  text-transform: none !important;
}
.tw-quote-prompt-inner p {
  margin: 0 0 22px !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
  color: #4A5058 !important;
}
.tw-quote-prompt .tw-quote-open {
  border: 0;
  cursor: pointer;
  font: 600 .95rem/1 Inter, Arial, sans-serif;
}
.tw-quote-prompt-call {
  margin: 18px 0 0 !important;
  font-size: .93rem !important;
  color: #5C6C7D !important;
}
.tw-quote-prompt-call a { color: #B4203F; text-decoration: none; font-weight: 600; }

/* The contact form sits inside the old Gravity Forms wrapper on index.html and
   contact-us/, and that plugin's theme CSS was painting our submit button its
   own blue (#204ce5) instead of the site maroon. The dialog's copy of the same
   button was unaffected, which is why the two did not match. */
#gform_wrapper_15 form.tw-form button.tw-submit,
.gform_wrapper form.tw-form button.tw-submit,
form.tw-form button.tw-submit {
  background-color: #B4203F !important;
  border: 1px solid #B4203F !important;
  color: #FFFFFF !important;
}
#gform_wrapper_15 form.tw-form button.tw-submit:hover,
.gform_wrapper form.tw-form button.tw-submit:hover,
form.tw-form button.tw-submit:hover {
  background-color: #8E1832 !important;
  border-color: #8E1832 !important;
}


/* ---- quote dialog: "you are requesting X, anything else?" ---------- */
.tw-also {
  background: #FDF6EF;
  box-shadow: 0 0 0 1px #E39A62;
  border-radius: 8px;
  padding: 16px 16px 12px;
  margin: 4px 0 18px;
}
.tw-also p { margin: 0 0 10px; color: #232B33; font-size: 15px; line-height: 1.5; }
.tw-also .tw-also-lead { font-size: 17px; }
.tw-also .tw-also-lead strong { color: #B4203F; }
.tw-also .tw-also-more {
  margin: 14px 0 8px; font-size: 13px; font-weight: 600; color: #5C6C7D;
  text-transform: uppercase; letter-spacing: .04em;
}
.tw-also .tw-also-picks .tw-also-suggest {
  background: #fff; border-radius: 6px; box-shadow: 0 0 0 1px #E9C9A9;
  padding: 8px 10px;
}
.tw-also .tw-also-change {
  margin-top: 12px; background: none; border: 0; padding: 4px 0;
  color: #B4203F; text-decoration: underline; font: inherit; font-size: 14px; cursor: pointer;
}
.tw-also .tw-also-note { margin: 12px 0 0; font-size: 14px; color: #5C6C7D; }
