/* Shared compact address display and accessible selectors. */
.sp-compact-select { position: relative; width: 100%; min-width: 0; }
.sp-compact-select > summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 2.75rem; padding: .5rem .65rem; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-bg-surface); color: var(--color-text-primary); cursor: pointer; font-size: .875rem; list-style: none; }
.sp-compact-select > summary::-webkit-details-marker { display: none; }
.sp-compact-select > summary::after { content: '\2304'; flex: 0 0 auto; }
.sp-compact-select > summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-compact-select > summary:focus-visible { outline: 2px solid var(--color-border-focus); outline-offset: 2px; }
.sp-compact-select[data-disabled="true"] > summary { opacity: .65; cursor: default; }
.sp-compact-select-panel { position: absolute; inset-inline: 0; top: calc(100% + .25rem); z-index: 60; background: var(--color-bg-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); padding: .25rem; }
.sp-compact-select-search { width: 100%; min-width: 0; padding: .5rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: .25rem; }
.sp-compact-select-options { max-height: min(18rem, 45dvh); overflow-y: auto; overscroll-behavior: contain; }
.sp-compact-select-option { display: block; width: 100%; text-align: start; border: 0; border-radius: var(--radius-sm); background: transparent; padding: .6rem .5rem; font-size: .8rem; line-height: 1.4; color: var(--color-text-primary); overflow-wrap: anywhere; }
.sp-compact-select-option[aria-selected="true"] { background: var(--color-bg-elevated); font-weight: 600; }
.sp-compact-select-option:hover, .sp-compact-select-option:focus-visible { background: var(--color-bg-hover); }
.sp-compact-select > summary > .sp-address-option { flex: 1; min-width: 0; }
.sp-compact-select-option.sp-address-option { display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: .5rem .65rem; border-bottom: 1px solid var(--color-border); line-height: 1.3; }
.sp-address-copy { display: flex; flex-direction: column; min-width: 0; gap: .15rem; }
.sp-address-title { font-size: .75rem; font-weight: 600; overflow-wrap: anywhere; }
.sp-address-detail { font-size: .7rem; font-weight: 400; color: var(--color-text-secondary); overflow-wrap: anywhere; }
.sp-address-check { width: .85rem; height: .85rem; flex: 0 0 .85rem; border: 1px solid var(--color-border); border-radius: 50%; }
.sp-address-option[aria-selected="true"] .sp-address-check { border: 3px solid var(--color-text-brand); background: var(--color-bg-surface); }
.sp-compact-select-option[aria-selected="true"] { background: var(--color-bg-canvas); }
.sp-compact-select > summary .sp-address-copy { display: flex; flex-direction: column; }

/* Address cards reuse the same title/detail hierarchy without selector chrome. */
.sp-customer-address { display: flex; align-items: flex-start; gap: .65rem; padding-block: .5rem; line-height: 1.35; }
.sp-customer-address + .sp-customer-address { border-top: 1px solid var(--color-border); }
.sp-address-type { flex: 0 0 5.5rem; padding-top: .05rem; font-size: .75rem; color: var(--color-text-secondary); }
.sp-customer-address .sp-address-copy { flex: 1; }
.sp-customer-address .sp-address-title { font-size: .8125rem; }
.sp-customer-address .sp-address-detail { font-size: .75rem; }
.sp-compact-select > summary .sp-address-title,
.sp-compact-select > summary .sp-address-detail { white-space: normal; overflow-wrap: anywhere; }
.sp-compact-select-search[hidden], select[data-address-select][hidden] { display: none !important; }
@media (max-width: 480px) {
  .sp-customer-address { flex-direction: column; gap: .15rem; }
  .sp-address-type { flex-basis: auto; font-size: .6875rem; }
  .sp-customer-address .sp-address-copy { flex: auto; width: 100%; }
}
