.fumot-insurance-choice {
  padding: 16px 0;
  border-top: 1px solid #e2e8f0;
}
.fumot-insurance-choice label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.fumot-insurance-choice input { margin-top: 5px; flex: none; }
.fumot-insurance-copy { flex: 1; min-width: 0; }
.fumot-insurance-copy small { display: block; margin-top: 5px; color: #64748b; font-weight: 400; }
.fumot-insurance-price { white-space: nowrap; }
.fumot-insurance-choice[aria-busy="true"] { opacity: .65; }
.fumot-insurance-choice [role="alert"] { color: #b91c1c; }

.wp-block-woocommerce-checkout-order-summary-block .fumot-insurance-summary {
  margin: 0;
  padding: 0px 16px 16px;
  border: 0;
  background: transparent;
}

.fumot-insurance-summary .fumot-insurance-choice {
  padding: 16px;
  border: 0;
}

.fumot-insurance-summary .fumot-insurance-choice label {
  margin: 0;
}

.fumot-insurance-summary .fumot-insurance-choice > p {
  margin-bottom: 0px;
  padding-inline-start: 22px;
  overflow-wrap: anywhere;
}

.fumot-insurance-fee-loading {
  position: relative;
  color: transparent !important;
}

.fumot-insurance-fee-loading::after,
.fumot-insurance-native-skeleton {
  width: 45px;
  height: 1em;
  border-radius: 4px;
  background: color-mix(in srgb, var(--fumot-insurance-skeleton-ink, #111827) 5%, transparent);
}

.fumot-insurance-fee-loading::after {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  transform: translateY(-50%);
  background-image: linear-gradient(90deg, transparent, #1118270d 50%, transparent);
  background-size: 200% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .fumot-insurance-fee-loading::after {
    animation: fumot-insurance-shimmer 1.25s infinite;
  }
}

@keyframes fumot-insurance-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* Independent insurance card below each order total, including mobile summaries. */
.fumot-insurance-summary .fumot-insurance-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 12px 0px;
  border-top: 1px dashed #c8c9cf;
}
.fumot-insurance-title { display: flex; align-items: center; gap: 7px; line-height: 1.4; }
.fumot-insurance-title svg { flex: none; }
.fumot-insurance-card .fumot-insurance-copy small { color: inherit; line-height: 1.4; }
.fumot-insurance-card .fumot-insurance-rules-link { display: inline-block; margin-top: 6px; font-size: 12px; }
.fumot-insurance-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.fumot-insurance-card .fumot-insurance-price { font-weight: 700; font-size: 16px; }
.fumot-insurance-card .fumot-insurance-switch { position: relative; display: block; width: 34px; height: 20px; cursor: pointer; }
.fumot-insurance-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.fumot-insurance-switch-track { display: block; width: 34px; height: 20px; background: #aeb0b3; border-radius: 20px; transition: background .15s; }
.fumot-insurance-switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: white; transition: transform .15s; box-shadow: 0 1px 2px #0002; }
.fumot-insurance-switch input:checked + .fumot-insurance-switch-track { background: #1956b7; }
.fumot-insurance-switch input:checked + .fumot-insurance-switch-track::after { transform: translateX(14px); }
.fumot-insurance-switch input:focus-visible + .fumot-insurance-switch-track { outline: 2px solid #1956b7; outline-offset: 3px; }
.fumot-insurance-switch input:disabled { cursor: wait; }
.fumot-insurance-card > [role="alert"] { grid-column: 1 / -1; margin: 0; padding: 0; }

/* Only the top mobile sidebar summary; the bottom action summary keeps its spacing. */
.wc-block-checkout.is-mobile .wc-block-components-checkout-order-summary__content > .fumot-insurance-summary {
  margin: 0;
  padding: 0px 0px 16px 0px;
  border: 0;
  background: transparent;
}

.fumot-insurance-title .fumot-insurance-help {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 1em; width: 1em; height: 1em; min-width: 0;
  padding: 0; margin: 0; border: 1.5px solid currentColor; border-radius: 50%;
  background: transparent; color: #64748b; font: inherit; font-size: 1em; line-height: 1;
  cursor: pointer; box-shadow: none;
}
.fumot-insurance-title .fumot-insurance-help:hover { color: #1267f4; background: #eaf4ff; }
.fumot-insurance-title .fumot-insurance-help:focus-visible { outline: 2px solid #1267f4; outline-offset: 3px; }
.fumot-insurance-drawer { margin: 0 0 12px; padding: 0; }
.fumot-insurance-drawer[hidden] { display: none; }
.fumot-insurance-drawer .fumot-insurance-card { padding: 12px 0; }
.fumot-insurance-drawer .fumot-insurance-price { font-size: 14px; }
.fumot-insurance-drawer > [role="alert"] { color: #b91c1c; font-size: 13px; }

/* The cart drawer must not inherit WooCommerce totals-wrapper separators. */
.wc-block-components-totals-wrapper.fumot-insurance-summary.fumot-insurance-drawer {
  border-top: 0;
}

/* Hide Salesmartly while the cart drawer is open; restore on close. */
body.cart-drawer-open salesmartly-chat-widget,
body.cart-drawer-open .ssc-widget-scope,
body.cart-drawer-open #s-chat-code {
  display: none !important;
}

.fumot-insurance-summary .fumot-insurance-title .fumot-insurance-help { font-size: 13px; flex-basis: 13px; width: 13px; height: 13px; }
