/*!
 * SMC Address Assist - account pages (Create Account, Address Book add and edit).
 * Styles only the elements the Address Assist script adds (smcaa-* classes). Nothing on the
 * page looks different until the shopper uses the address suggestions, ZIP help or final check.
 * Below 1025 px every control text is 16 px (no iPhone tap zoom) and every target is 44 px.
 *
 * @package   SmcAddressAssist
 * @version   1.1.0
 * @updated   2026-10-09
 */
.smcaa-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ---------- suggestions (combobox popup, placed under the street field by the script) ---------- */
.smcaa-ac {
  position: fixed;
  z-index: 10050;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: 360px;
  margin: 0;
  border: 1px solid #b8c7d8;
  border-radius: 0 0 8px 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(25, 49, 79, .16);
  color: #1b2a3b;
  font-size: 16px;
  line-height: 1.35;
  text-align: left;
  overflow: hidden;
}
.smcaa-ac[hidden] { display: none !important; }
.smcaa-ac-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 0;
  margin: 0;
}
.smcaa-ac-option {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  box-sizing: border-box;
  min-height: 44px;
  padding: 9px 12px;
  border-bottom: 1px solid #edf1f5;
  background: #fff;
  color: #1b2a3b;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.smcaa-ac-option:last-child { border-bottom: 0; }
.smcaa-ac-option:hover,
.smcaa-ac-option.is-active { background: #e8f1fb; }
.smcaa-ac-option.is-active { box-shadow: inset 3px 0 0 #102d5a; }
.smcaa-ac-main { font-weight: 700; color: #102d5a; }
.smcaa-ac-secondary { font-size: 14px; color: #4a5a6d; }
.smcaa-ac-attribution {
  flex: 0 0 auto;
  padding: 6px 12px 7px;
  border-top: 1px solid #e1e7ee;
  background: #f8fafc;
  color: #5e5e5e;
  font-family: Roboto, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.3;
  text-align: right;
  white-space: nowrap;
}
input[role="combobox"][aria-expanded="true"][data-smcaa-bound="1"] {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* ---------- shared buttons ---------- */
.smcaa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
  margin: 0;
  padding: 9px 16px;
  border: 1px solid #102d5a;
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: normal;
  text-align: center;
  text-transform: none;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  box-shadow: none;
  height: auto;
  width: auto;
}
.smcaa-btn-primary { background: #102d5a; border-color: #102d5a; color: #fff; }
.smcaa-btn-primary:hover { background: #0a2144; border-color: #0a2144; color: #fff; }
.smcaa-btn-secondary { background: #fff; border-color: #6b7f99; color: #102d5a; }
.smcaa-btn-secondary:hover { background: #f1f7fd; color: #102d5a; }
.smcaa-btn-link { background: transparent; border-color: transparent; color: #102d5a; text-decoration: underline; }
.smcaa-btn-link:hover { background: #f1f7fd; color: #0a2144; }
.smcaa-btn:focus-visible,
.smcaa-dialog-title:focus-visible { outline: 3px solid #276fae; outline-offset: 2px; }

/* ---------- ZIP help (under the ZIP field) ---------- */
.smcaa-zip-hint {
  box-sizing: border-box;
  max-width: 460px;
  margin: -4px 0 12px;
  padding: 10px 12px;
  border: 1px solid #bad6f0;
  border-radius: 6px;
  background: #f1f7fd;
  color: #153d6b;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.smcaa-zip-hint:empty { display: none; }
.smcaa-zip-hint.smcaa-zip-success { border-color: #a8d6b7; background: #f1faf4; color: #165b2b; }
.smcaa-zip-hint.smcaa-zip-suggest { border-color: #e7c67e; background: #fff8e9; color: #5c3b00; }
.smcaa-zip-text { display: block; }
.smcaa-zip-hint .smcaa-btn { margin-top: 8px; }

/* ---------- "Checking your address" next to the submit button ---------- */
.smcaa-checking {
  display: block;
  flex-basis: 100%;
  width: 100%;
  margin: 8px 0 0;
  color: #153d6b;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.smcaa-checking::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid #9eb0c6;
  border-top-color: #102d5a;
  border-radius: 50%;
  vertical-align: -1px;
  animation: smcaa-spin .8s linear infinite;
}
@keyframes smcaa-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .smcaa-checking::before { animation: none; }
}
form[data-smcaa-state="checking"] [type="submit"] { cursor: progress; }

/* ---------- choice dialog ---------- */
.smcaa-dialog {
  box-sizing: border-box;
  width: min(600px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: #1b2a3b;
  box-shadow: 0 18px 48px rgba(10, 33, 68, .28);
  font-size: 16px;
  line-height: 1.45;
  text-align: left;
  overflow: auto;
}
.smcaa-dialog::backdrop { background: rgba(10, 20, 35, .55); }
.smcaa-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(10, 20, 35, .55);
}
.smcaa-dialog-backdrop .smcaa-dialog { position: relative; display: block; }
.smcaa-dialog-inner { padding: 22px 22px 20px; }
.smcaa-dialog .smcaa-dialog-title {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  background: none;
  color: #0a2144;
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
}
.smcaa-dialog .smcaa-dialog-intro { margin: 0 0 14px; padding: 0; color: #2c3a4b; font-size: 16px; }
.smcaa-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.smcaa-cards > .smcaa-card:only-child { grid-column: 1 / -1; }
.smcaa-card {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #cfdae6;
  border-radius: 8px;
  background: #fff;
}
.smcaa-card.is-suggested { border-color: #93bee6; background: #f4f9fe; }
.smcaa-dialog .smcaa-card-label {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  background: none;
  color: #102d5a;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .03em;
  text-align: left;
  text-transform: uppercase;
}
.smcaa-dialog .smcaa-card-address { margin: 0; padding: 0; color: #1b2a3b; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.smcaa-changed { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.smcaa-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

@media (max-width: 1024px) {
  .smcaa-btn { font-size: 16px; }
  .smcaa-zip-hint { font-size: 16px; }
  .smcaa-checking { font-size: 16px; }
}
@media (max-width: 991px) {
  .smcaa-zip-hint { max-width: 100%; }
}
@media (max-width: 599px) {
  .smcaa-dialog-inner { padding: 18px 16px 16px; }
  .smcaa-dialog .smcaa-dialog-title { font-size: 20px; }
  .smcaa-cards { grid-template-columns: minmax(0, 1fr); }
  .smcaa-actions { flex-direction: column; align-items: stretch; }
  .smcaa-actions .smcaa-btn { width: 100%; }
}
