/* ==========================================================================
   Hamilton Insurance site overrides (loaded after main.css).
   Keep template edits here instead of in main.css.
   ========================================================================== */

/* --- Header: one-line menu that flows between the logo and Get Quote --------
   The template splits the header 3/6/3 with 52px gaps, which only fits four
   menu items; with five it wrapped onto two rows and pushed Get Quote out of
   line. The row is now logo (auto) | menu (fills) | actions (auto). */
@media (min-width: 1200px) {
  .hi-header-row .hi-header-menu-col {
    min-width: 0;
    padding-left: clamp(20px, 2.5vw, 48px);
  }
  /* The template's divider after the logo sat inside the logo once the
     column became auto-width; the menu column's padding now does that job. */
  .hi-header-row .tp-header-main-left::after {
    display: none;
  }
  .hi-header-row .tp-main-menu {
    margin-left: 0;
    padding-left: 26px;   /* room for the template's home icon */
  }
  .hi-header-row .tp-main-menu ul {
    white-space: nowrap;
    margin: 0;
    padding: 0;
  }
  .hi-header-row .tp-main-menu ul li:not(:last-of-type) {
    margin-right: clamp(18px, 2.2vw, 44px);
  }
  /* Submenus must still wrap their own text normally. */
  .hi-header-row .tp-main-menu ul li .submenu {
    white-space: normal;
  }

  .hi-header-actions {
    gap: clamp(20px, 2vw, 36px);
    padding-left: clamp(16px, 1.5vw, 32px);
    padding-right: clamp(20px, 3vw, 60px);
  }
  .hi-header-actions .tp-header-btn {
    padding-left: 0;
  }
  .hi-header-actions .tp-btn {
    white-space: nowrap;
  }
}

/* Laptops (1200-1399px): a narrower menu block, tighter gaps and a slimmer
   button so the five menu items and Get Quote fit on one line. */
@media (min-width: 1200px) and (max-width: 1399px) {
  .hi-header-row .tp-header-hamburger-btn {
    width: 96px;
    margin-right: 20px;
  }
  .hi-header-row .tp-header-logo {
    padding-left: 0;
  }
  .hi-header-row .tp-main-menu ul li a {
    font-size: 15px;
  }
  .hi-header-row .tp-main-menu ul li:not(:last-of-type) {
    margin-right: 18px;
  }
  .hi-header-actions .tp-btn {
    padding: 21px 28px;
  }
  .hi-header-actions {
    padding-right: 24px;
  }
}

/* Desktops (1400-1599px): the search icon appears here, so trim the menu
   block and gaps a little to keep clear space before it. */
@media (min-width: 1400px) and (max-width: 1599px) {
  .hi-header-row .tp-header-hamburger-btn {
    width: 130px;
    margin-right: 28px;
  }
  .hi-header-row .tp-main-menu ul li:not(:last-of-type) {
    margin-right: 26px;
  }
  .hi-header-actions .tp-btn {
    padding: 21px 34px;
  }
}

/* ==========================================================================
   Buy motor cover (/insure, /pay/{token}). Builds on the template's
   .tp-contact-form / .tp-contact-input / .tp-btn so it matches the site.
   ========================================================================== */
.hi-insure .tp-contact-input input.is-invalid { border-color: var(--tp-theme-secondary); }
.hi-error { display: block; margin-top: 6px; font-size: 14px; color: var(--tp-theme-secondary); }
.hi-hint { display: block; margin-top: 6px; font-size: 14px; color: var(--tp-text-body); }
.hi-hint a, .hi-insure p a { color: var(--tp-theme-secondary); }

.hi-section-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 20px; font-weight: 600; color: #08151F;
  margin: 10px 0 20px;
}
.hi-section-title span {
  font-family: var(--tp-ff-poppins); font-size: 13px; font-weight: 600;
  color: #fff; background: var(--tp-theme-primary);
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Selectable cards (cover, payment method) */
.hi-option { display: block; margin-bottom: 16px; cursor: pointer; }
.hi-option input { position: absolute; opacity: 0; pointer-events: none; }
.hi-option-body {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 60px; padding: 14px 22px 14px 54px; position: relative;
  border: 1px solid #D4DCE0; border-radius: 2px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.hi-option-body::before {
  content: ""; position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid #D4DCE0; background: #fff;
}
.hi-option-body strong { font-weight: 600; color: #08151F; }
.hi-option-body small { color: var(--tp-text-body); font-size: 14px; }
.hi-option input:checked + .hi-option-body { border-color: var(--tp-theme-primary); box-shadow: 0 0 0 1px var(--tp-theme-primary); }
.hi-option input:checked + .hi-option-body::before { border: 6px solid var(--tp-theme-secondary); }
.hi-option input:focus-visible + .hi-option-body { outline: 2px solid var(--tp-theme-secondary); outline-offset: 2px; }

.hi-check { display: flex; gap: 12px; align-items: flex-start; margin: 6px 0 4px; cursor: pointer; color: #555; }
.hi-check input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--tp-theme-secondary); flex: none; }

/* Progress steps */
.hi-steps { display: flex; gap: 12px; list-style: none; padding: 0; margin: 0 0 30px; }
.hi-steps li { flex: 1; display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 3px solid #E6EDF2; color: #8a93a6; }
.hi-steps-num { font-family: var(--tp-ff-poppins); font-weight: 600; font-size: 14px; }
.hi-steps-label { font-weight: 500; }
.hi-steps li.is-current { border-color: var(--tp-theme-secondary); color: #08151F; }
.hi-steps li.is-done { border-color: var(--tp-theme-primary); color: var(--tp-theme-primary); }
@media (max-width: 575px) { .hi-steps-label { font-size: 13px; } }

/* Alerts */
.hi-alert { padding: 16px 20px; border-radius: 2px; margin-bottom: 24px; border-left: 4px solid; background: #fff; }
.hi-alert-danger { border-color: var(--tp-theme-secondary); color: #8a1111; }
.hi-alert-warning { border-color: #f5a623; color: #6b4a00; }
.hi-alert-info { border-color: var(--tp-theme-primary); color: var(--tp-theme-primary); }

/* Quote summary card */
.hi-quote-card { background: var(--tp-theme-primary); color: #fff; border-radius: 9px; padding: 40px 36px; position: sticky; top: 120px; }
.hi-quote-card h4 { color: #fff; font-size: 26px; margin: 10px 0 6px; }
.hi-quote-card p { color: rgba(255,255,255,.75); margin-bottom: 24px; }
.hi-quote-ref { font-family: var(--tp-ff-poppins); font-size: 12px; letter-spacing: .08em; color: rgba(255,255,255,.6); }
.hi-quote-card ul { list-style: none; padding: 0; margin: 0; }
.hi-quote-card li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.85); }
.hi-quote-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; }
.hi-quote-total strong { font-size: 30px; color: #fff; }
.hi-quote-total span { color: rgba(255,255,255,.75); }

/* Payment states */
.hi-pay-title { font-size: 26px; line-height: 1.3; margin-bottom: 20px; }
.hi-pending { text-align: center; padding: 10px 0 30px; margin-bottom: 30px; border-bottom: 1px solid #E6EDF2; }
.hi-pending h4 { font-size: 22px; margin: 14px 0 10px; }
.hi-code { font-family: var(--tp-ff-poppins); font-size: 42px; font-weight: 700; letter-spacing: .12em; color: var(--tp-theme-primary); margin: 10px 0; }
.hi-qr { max-width: 200px; margin: 10px auto; display: block; }
.hi-otp { display: flex; gap: 10px; max-width: 320px; margin: 0 auto; }
.hi-otp input { text-align: center; }
.hi-card-frame { width: 100%; height: 420px; border: 0; background: #fff; }
.hi-btn-outline { background: transparent; color: var(--tp-theme-primary); border: 1px solid var(--tp-theme-primary); }
.hi-btn-outline:hover { color: #fff; }

.hi-spinner {
  width: 46px; height: 46px; margin: 0 auto; display: block;
  border: 4px solid #E6EDF2; border-top-color: var(--tp-theme-secondary); border-radius: 50%;
  animation: hi-spin .9s linear infinite;
}
.hi-spinner-sm { width: 16px; height: 16px; border-width: 2px; display: inline-block; vertical-align: -3px; margin-right: 6px; }
@keyframes hi-spin { to { transform: rotate(360deg); } }

/* Paid */
.hi-success-icon {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 20px;
  background: var(--tp-theme-primary); color: #fff; font-size: 32px;
  display: flex; align-items: center; justify-content: center;
}
.hi-summary { max-width: 460px; text-align: left; border-top: 1px solid #E6EDF2; }
.hi-summary div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #E6EDF2; }
.hi-summary span { color: var(--tp-text-body); }
.hi-summary strong { color: #08151F; }

/* Phones: let the step bar shrink (only the current step keeps its label)
   and give the cards less padding, so nothing pushes the page sideways. */
.hi-steps li { min-width: 0; }
.hi-steps-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 575px) {
  .hi-steps { gap: 8px; }
  .hi-steps li:not(.is-current) { flex: 0 0 auto; }
  .hi-steps li:not(.is-current) .hi-steps-label { display: none; }
  .hi-insure.tp-contact-form { padding: 30px 20px; }
  .hi-quote-card { padding: 28px 22px; position: static; }
  .hi-quote-total strong { font-size: 26px; }
  .hi-code { font-size: 32px; }
  .hi-option-body { padding-right: 14px; }
  .breadcrumb__list span { white-space: normal; }
}
