/* My Addresses — v2 UI */

.swal2-popup.fishme-swal-popup {
  border-radius: 12px;
  padding: 24px 22px 20px;
}

.swal2-popup.fishme-swal-popup .swal2-title {
  font-size: 22px;
  color: #1f1f25;
}

.swal2-popup.fishme-swal-popup .swal2-html-container {
  font-size: 15px;
  color: #5f676d;
}

.swal2-popup.fishme-swal-popup .swal2-actions {
  gap: 10px;
}

.swal2-popup.fishme-swal-popup .swal2-styled.swal2-confirm,
.swal2-popup.fishme-swal-popup .swal2-styled.swal2-cancel {
  border-radius: 8px;
  font-weight: 600;
  padding: 10px 18px;
}

.account-addresses-panel--v2 {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.account-addresses-alert {
  padding: 14px 18px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
}

.account-addresses-alert[hidden] {
  display: none !important;
}

.account-addresses-alert.is-success {
  background: rgba(98, 157, 35, 0.12);
  border: 1px solid #629D23;
  color: #3d6216;
}

.account-addresses-alert.is-error {
  background: rgba(192, 2, 8, 0.08);
  border: 1px solid var(--color-primary);
  color: var(--color-primary-2);
}

.account-addresses-shell {
  background: #fff;
  border: 1px solid #E2E2E2;
  border-radius: 8px;
  overflow: hidden;
}

.account-addresses-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 32px;
  background: linear-gradient(135deg, rgba(192, 2, 8, 0.06) 0%, rgba(31, 31, 37, 0.03) 100%);
  border-bottom: 1px solid #ECECEC;
}

.account-addresses-count {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  background: rgba(192, 2, 8, 0.1);
  padding: 5px 12px;
  border-radius: 50px;
  margin-bottom: 10px;
}

.account-addresses-toolbar .title {
  margin-bottom: 6px;
  font-size: 26px;
}

.account-addresses-toolbar .disc {
  margin: 0;
  max-width: 520px;
  color: var(--color-body);
  font-size: 15px;
  line-height: 1.6;
}

.account-addresses-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.account-addresses-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  padding: 24px 30px 28px;
}

.account-addresses-list {
  display: contents;
  list-style: none;
  margin: 0;
  padding: 0;
}

.account-address-item {
  position: relative;
  background: #fff;
  border: 1px solid #e8e8ec;
  border-radius: 16px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(31, 31, 37, 0.04);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.account-address-item:hover {
  border-color: #d6d6dc;
  box-shadow: 0 8px 24px rgba(31, 31, 37, 0.08);
  transform: translateY(-2px);
}

.account-address-item.is-default {
  border-color: rgba(192, 2, 8, 0.28);
  background: linear-gradient(180deg, rgba(192, 2, 8, 0.03) 0%, #fff 42%);
  box-shadow: 0 10px 26px rgba(192, 2, 8, 0.1);
}

.account-address-ribbon {
  position: absolute;
  top: 12px;
  right: -34px;
  z-index: 4;
  width: 120px;
  padding: 5px 0;
  background: var(--color-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  transform: rotate(35deg);
  box-shadow: 0 4px 12px rgba(192, 2, 8, 0.25);
  pointer-events: none;
}

.account-address-card__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  min-height: 248px;
  height: 100%;
}

.account-address-card__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.account-address-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 10px;
}

.account-address-card__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.account-address-card__title-wrap {
  min-width: 0;
}

.account-address-card__meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: #8a9299;
  line-height: 1.35;
}

.account-address-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.account-address-icon--home {
  background: rgba(192, 2, 8, 0.1);
  color: var(--color-primary);
}

.account-address-icon--work {
  background: rgba(31, 31, 37, 0.08);
  color: var(--color-secondary);
}

.account-address-icon--other {
  background: rgba(98, 157, 35, 0.12);
  color: #629d23;
}

.account-address-label {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-heading-1);
  line-height: 1.25;
}

.account-address-card__aside {
  position: relative;
  min-height: 100%;
  background: #eef1f3;
  border-left: 1px solid #ececf0;
}

.account-address-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0 16px 12px;
}

.account-address-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px 13px;
  border-top: 1px dashed #ebebef;
  margin-top: auto;
  min-height: 58px;
}

.account-address-select {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
}

.account-address-select--card {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.account-address-select input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.account-address-radio {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 2px solid #D0D0D0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.account-address-radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  transform: scale(0);
  transition: transform 0.2s ease;
}

.account-address-select input:checked + .account-address-radio {
  border-color: var(--color-primary);
}

.account-address-select input:checked + .account-address-radio::after {
  transform: scale(1);
}

.account-address-select input:focus-visible + .account-address-radio {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.account-address-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-heading-1);
  line-height: 1.35;
}

.account-address-default-text {
  font-size: 13px;
  font-weight: 500;
  color: #6e777d;
  line-height: 1.25;
  min-width: 0;
  white-space: nowrap;
}

.account-address-item.is-default .account-address-default-text {
  color: var(--color-primary);
  font-weight: 600;
}

.account-address-lines {
  font-size: 13px;
  color: #5f676d;
  line-height: 1.55;
  margin: 0;
}

.account-address-phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #434a50;
}

.account-address-phone i {
  color: var(--color-primary);
  font-size: 12px;
}

.account-address-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.account-address-action-btn {
  width: 32px !important;
  min-width: 32px;
  max-width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #e4e4e8 !important;
  border-radius: 8px;
  background: #fff !important;
  color: #6e777d;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.account-address-action-btn:hover {
  color: var(--color-primary);
  border-color: rgba(192, 2, 8, 0.35) !important;
  background: rgba(192, 2, 8, 0.04) !important;
}

.account-address-action-btn.is-delete:hover {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.35) !important;
  background: rgba(220, 38, 38, 0.05) !important;
}

.account-addresses-add-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 248px;
  margin: 0;
  padding: 24px;
  border: 2px dashed #D0D0D0;
  border-radius: 16px;
  background: #FAFAFA;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-heading-1);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.account-addresses-add-tile[hidden] {
  display: none !important;
}

.account-addresses-add-tile:hover {
  border-color: var(--color-primary);
  background: rgba(192, 2, 8, 0.04);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.account-addresses-add-tile-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.account-addresses-empty-state {
  text-align: center;
  padding: 56px 32px 48px;
}

.account-addresses-empty-state[hidden] {
  display: none !important;
}

.account-addresses-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(192, 2, 8, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--color-primary);
}

.account-addresses-empty-state h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--color-heading-1);
}

.account-addresses-empty-state p {
  color: var(--color-body);
  margin-bottom: 22px;
}

.account-addresses-billing-v2 {
  background: #fff;
  border: 1px solid #E2E2E2;
  border-radius: 8px;
  padding: 24px 28px;
}

.account-addresses-billing-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.account-addresses-billing-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(31, 31, 37, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--color-secondary);
  flex-shrink: 0;
}

.account-addresses-billing-head h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--color-heading-1);
}

.account-addresses-billing-head p {
  margin: 0;
  font-size: 13px;
  color: var(--color-body);
}

.account-addresses-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 14px;
}

.account-addresses-toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.account-addresses-toggle-ui {
  width: 44px;
  height: 24px;
  border-radius: 50px;
  background: #D8D8D8;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.account-addresses-toggle-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.account-addresses-toggle-row input:checked + .account-addresses-toggle-ui {
  background: var(--color-primary);
}

.account-addresses-toggle-row input:checked + .account-addresses-toggle-ui::after {
  transform: translateX(20px);
}

.account-addresses-toggle-label {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-heading-1);
}

.account-addresses-billing-preview {
  padding: 14px 16px;
  background: #F8F8F8;
  border-radius: 6px;
  border: 1px solid #ECECEC;
}

.account-addresses-billing-preview .address {
  margin: 0;
  font-size: 14px;
  color: var(--color-body);
  line-height: 1.65;
}

.account-addresses-billing-separate {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ECECEC;
}

.account-addresses-billing-separate[hidden] {
  display: none !important;
}

.account-addresses-billing-separate .address {
  font-size: 14px;
  color: var(--color-body);
  line-height: 1.65;
  margin-bottom: 10px;
}

.account-addresses-text-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
}

.account-addresses-text-btn:hover {
  text-decoration: underline;
}

.account-addresses-toggle-row--form {
  margin: 4px 0 22px;
}

/* Address map picker */
.fishme-address-map-block {
  max-width: 720px;
  margin: 12px auto 20px;
  width: 100%;
  min-width: 0;
  border: 1px solid #e8e8ea;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 31, 37, 0.04);
  isolation: isolate;
  position: relative;
  z-index: 0;
  flex-shrink: 0;
}

.fishme-address-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}

.fishme-address-map-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1f1f25;
  margin-bottom: 4px;
}

.fishme-address-map-hint {
  margin: 0;
  font-size: 12px;
  color: #6e777d;
  line-height: 1.4;
}

.fishme-address-map-locate {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto !important;
  min-width: 0;
  margin: 0;
  border: 1px solid rgba(192, 2, 8, 0.2) !important;
  background: #fff;
  color: var(--color-primary, #c00208);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
}

.fishme-address-map-locate:hover {
  background: rgba(192, 2, 8, 0.06);
}

.fishme-address-map-search-wrap {
  padding: 14px 16px 12px;
  background: #fff;
  display: grid;
}

.fishme-address-map-search-wrap > i {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: start;
  margin-left: 14px;
  color: #9aa3a9;
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

.fishme-address-map-search-wrap > .fishme-address-map-search,
input[type=search].fishme-address-map-search {
  grid-area: 1 / 1;
  width: 100% !important;
  max-width: 100%;
  height: 42px;
  border: 1px solid #e8e8ea;
  border-radius: 10px;
  padding-top: 0 !important;
  padding-right: 14px !important;
  padding-bottom: 0 !important;
  padding-left: 44px !important;
  font-size: 14px;
  background: #fff;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.fishme-address-map-canvas {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 280px;
  min-height: 280px;
  background: #e9ecef;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.fishme-address-map-canvas .leaflet-container {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  font: inherit;
  z-index: 1;
}

.fishme-address-map-canvas .leaflet-pane,
.fishme-address-map-canvas .leaflet-map-pane,
.fishme-address-map-canvas .leaflet-tile-pane,
.fishme-address-map-canvas .leaflet-overlay-pane {
  width: 100%;
  height: 100%;
}

.account-address-modal--v2 .fishme-address-map-canvas .leaflet-pane,
.account-address-modal--v2 .fishme-address-map-canvas .leaflet-top,
.account-address-modal--v2 .fishme-address-map-canvas .leaflet-bottom,
.account-address-modal--v2 .fishme-address-map-canvas .leaflet-control {
  z-index: 1 !important;
}

.account-address-modal--v2 .fishme-address-map-canvas .leaflet-tile-pane {
  z-index: 1 !important;
}

.account-address-modal--v2 .fishme-address-map-canvas .leaflet-overlay-pane,
.account-address-modal--v2 .fishme-address-map-canvas .leaflet-shadow-pane {
  z-index: 2 !important;
}

.account-address-modal--v2 .fishme-address-map-canvas .leaflet-marker-pane {
  z-index: 3 !important;
}

.fishme-address-map-coords-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px 16px 0;
  background: #fafafa;
}

.fishme-address-map-coords-row .single-input {
  margin-bottom: 0;
}

.fishme-address-map-coords-row input[readonly] {
  background: #fff;
  color: #1f1f25;
  cursor: default;
}

.fishme-address-map-coords-display {
  margin: 0;
  padding: 10px 16px 14px;
  font-size: 12px;
  color: #6e777d;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
}

.fishme-address-map-coords-display span {
  font-weight: 600;
  color: #1f1f25;
}

.account-address-map-preview {
  position: absolute;
  inset: 0;
  margin: 0;
}

.account-address-map-preview__canvas {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 168px;
  border-radius: 0;
  overflow: hidden;
  border: 0;
  background: #e9ecef;
}

.account-address-map-preview--placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  text-align: center;
  background: linear-gradient(180deg, rgba(192, 2, 8, 0.07) 0%, rgba(31, 31, 37, 0.03) 100%);
}

.account-address-map-preview--placeholder.account-address-map-preview--work {
  background: linear-gradient(145deg, rgba(31, 31, 37, 0.08) 0%, rgba(31, 31, 37, 0.03) 100%);
}

.account-address-map-preview--placeholder.account-address-map-preview--other {
  background: linear-gradient(145deg, rgba(98, 157, 35, 0.12) 0%, rgba(31, 31, 37, 0.03) 100%);
}

.account-address-map-preview__placeholder-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 12px rgba(31, 31, 37, 0.08);
}

.account-address-map-preview--work .account-address-map-preview__placeholder-icon {
  color: var(--color-secondary);
}

.account-address-map-preview--other .account-address-map-preview__placeholder-icon {
  color: #629d23;
}

.account-address-map-preview__placeholder-text {
  font-size: 10px;
  font-weight: 600;
  color: #8a9299;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.account-address-map-preview__canvas .leaflet-container {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  font: inherit;
  z-index: 1;
}

.account-address-map-preview__canvas .leaflet-pane,
.account-address-map-preview__canvas .leaflet-map-pane,
.account-address-map-preview__canvas .leaflet-tile-pane,
.account-address-map-preview__canvas .leaflet-overlay-pane {
  width: 100%;
  height: 100%;
}

.account-address-map-preview__canvas .leaflet-control-attribution {
  font-size: 9px;
  line-height: 1.2;
  padding: 2px 4px;
  background: rgba(255, 255, 255, 0.82);
}

.account-address-location {
  margin: 8px 0 0;
  font-size: 12px;
  color: #6e777d;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.account-address-location i {
  color: var(--color-primary, #c00208);
}

@media (max-width: 767px) {
  .fishme-address-map-head {
    flex-direction: column;
  }

  .fishme-address-map-coords-row {
    grid-template-columns: 1fr;
  }

  .fishme-address-map-canvas {
    height: 220px;
    min-height: 220px;
  }
}

/* Modal v2 — large panel over dimmed backdrop */
.account-address-modal--v2 .account-address-modal-dialog {
  width: min(720px, calc(100% - 40px));
  height: auto;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  padding: 0;
  overflow: hidden;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
}

.account-address-modal-accent {
  height: 5px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-3) 100%);
}

.account-address-modal--v2 .account-address-modal-header {
  flex-shrink: 0;
  padding: 20px 24px;
  margin-bottom: 0;
  border-bottom: 1px solid #e2e2e2;
  background: #fff;
}

.account-address-modal-kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.account-address-modal--v2 .account-address-modal-header .title {
  font-size: 24px;
}

.account-address-modal--v2 .account-address-form .input-half-area,
.account-address-modal--v2 .account-address-form > .single-input,
.account-address-modal--v2 .account-address-form > .fishme-address-map-block,
.account-address-modal--v2 .account-address-form > .account-addresses-toggle-row--form {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Consistent label + field alignment inside the modal */
.account-address-modal--v2 .account-address-form .input-half-area {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.account-address-modal--v2 .account-address-form > .single-input {
  margin-bottom: 16px;
}

.account-address-modal--v2 .account-address-form .input-half-area .single-input,
.account-address-modal--v2 .account-address-form .fishme-address-map-coords-row .single-input {
  margin-bottom: 0;
  min-width: 0;
}

.account-address-modal--v2 .account-address-form .single-input label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #1f1f25;
}

.account-address-modal--v2 .account-address-form .single-input label .optional {
  font-weight: 400;
  color: #6e777d;
}

.account-address-modal--v2 .account-address-form .single-input input:not([type="checkbox"]) {
  display: block;
  width: 100%;
  height: 48px;
  margin-bottom: 0 !important;
  padding: 0 14px;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  font-size: 15px;
  box-sizing: border-box;
}

.account-address-modal--v2 .account-address-form .fishme-address-map-head {
  align-items: flex-start;
}

.account-address-modal--v2 .account-address-form .fishme-address-map-coords-row {
  align-items: start;
}

.account-address-modal--v2 .account-address-form .fishme-address-map-coords-row .single-input label {
  min-height: 19px;
}

.account-address-modal--v2 .account-addresses-toggle-row--form {
  align-items: center;
}

@media (max-width: 575px) {
  .account-address-modal--v2 .account-address-form .input-half-area {
    grid-template-columns: 1fr;
  }
}

.account-address-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

body.account-address-modal-open {
  overflow: hidden;
}

.account-address-modal[hidden] {
  display: none !important;
}

.account-address-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(31, 31, 37, 0.55);
  backdrop-filter: blur(2px);
}

.account-address-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: calc(100vh - 40px);  
  max-height: calc(100dvh - 40px); 
    overflow: hidden;  
  background: #fff;
  box-shadow: 0 20px 50px rgba(31, 31, 37, 0.25);
}

.account-address-modal-close {
  background: #F3F3F3;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-heading-1);
  flex-shrink: 0;
}

.account-address-modal-close:hover {
  background: rgba(192, 2, 8, 0.1);
  color: var(--color-primary);
}

.account-address-form .optional {
  font-weight: 400;
  color: var(--color-body);
}

.account-address-modal--v2 .account-address-modal-actions {
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}

.account-address-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px 28px;
  margin-top: 0;
  max-width: none;
  width: 100%;
  border-top: 1px solid #e2e2e2;
  background: #fafafa;
  box-shadow: 0 -8px 24px rgba(31, 31, 37, 0.06);
}

.account-address-modal-actions .rts-btn {
  margin-top: 0;
}

.account-address-modal--v2 .account-address-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

@media only screen and (max-width: 767px) {
  .account-addresses-toolbar {
    flex-direction: column;
    padding: 22px 20px;
  }

  .account-addresses-add-btn {
    width: 100%;
    justify-content: center;
  }

  .account-addresses-cards {
    grid-template-columns: 1fr;
    padding: 20px 18px 24px;
  }

  .account-address-card__layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 120px;
  }

  .account-address-card__aside {
    border-left: 0;
    border-top: 1px solid #ececf0;
    min-height: 120px;
  }

  .account-address-ribbon {
    top: 10px;
    right: -38px;
  }

  .account-address-modal {
    padding: 0;
    align-items: flex-end;
  }

  .account-address-modal--v2 .account-address-modal-dialog {
    width: 100%;
    max-width: none;
    max-height: 94vh;
    max-height: 94dvh;
    border-radius: 12px 12px 0 0;
  }

  .account-address-modal--v2 .account-address-modal-header {
    padding: 16px 18px;
  }

  .account-address-modal--v2 .account-address-form {
    padding: 18px 18px 16px;
  }

  .account-address-modal--v2 .account-address-modal-actions {
    padding: 16px 18px 20px;
    flex-direction: column;
    gap: 12px;
  }

  .account-address-modal--v2 .account-address-modal-actions-btns {
    width: 100%;
    flex-direction: column-reverse;
    gap: 10px;
  }

  .account-address-modal--v2 .account-address-modal-actions-btns .rts-btn {
    width: 100%;
    justify-content: center;
  }

  .account-addresses-toggle-row--actions {
    width: 100%;
  }
}

/* Checkout — shipping address picker */
.checkout-addresses-panel {
  margin-top: 0;
}

.checkout-order-notes {
  margin-top: 0;
  padding-top: 0;
  border: none;
  background: transparent;
}

.checkout-order-notes .single-input {
  margin-bottom: 0;
}

.checkout-order-notes label .optional {
  font-weight: 400;
  color: var(--color-body);
}
/* Make the form a scrollable flex column */
.account-address-modal--v2 .account-address-form {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding: 24px 24px 20px;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

/* Actions bar with checkbox on the left, buttons on the right */
.account-address-modal--v2 .account-address-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px 22px;
  border-top: 1px solid #e2e2e2;
  background: #fafafa;
  box-shadow: 0 -8px 24px rgba(31, 31, 37, 0.06);
}

.account-address-modal--v2 .account-address-modal-actions-btns {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.account-addresses-toggle-row--actions {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin: 0;
  flex: 1;
  min-width: 0;
}

.account-addresses-toggle-row--actions input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.account-addresses-toggle-row--actions .account-addresses-toggle-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-heading-1);
  white-space: nowrap;
}
