.customer-address-page {
    --address-green: #0c7a43;
    --address-green-dark: #075b33;
    --address-mint: #edf8f1;
    --address-line: #dbe7df;
    display: grid;
    gap: 14px;
    max-width: 980px;
    margin: 0 auto;
}

.customer-address-section,
.customer-address-editor {
    border: 1px solid var(--address-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(19, 62, 40, 0.07);
}

.customer-address-section h1,
.customer-address-section h2,
.customer-address-editor h2,
.customer-address-card h3 {
    margin: 0;
    color: #103d29;
}

.customer-address-section,
.customer-address-editor {
    padding: 22px;
}

.customer-address-section__heading,
.customer-address-editor > header {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.customer-address-section__heading h1,
.customer-address-editor h2 {
    margin-top: 2px;
    font-size: clamp(1.3rem, 3vw, 1.75rem);
}

.customer-address-editor > header > a {
    color: var(--address-green);
    font-weight: 800;
}

.customer-address-count {
    display: inline-grid;
    min-width: 48px;
    min-height: 38px;
    place-items: center;
    border-radius: 999px;
    background: var(--address-mint);
    color: var(--address-green-dark);
    font-weight: 900;
}

.customer-address-current-area {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
    padding: 9px 11px;
    border: 1px solid #d8eade;
    border-radius: 14px;
    background: #f5fbf7;
}

.customer-address-current-area > span:first-child {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: #dff4e6;
    color: var(--address-green);
    font-size: 1.35rem;
    font-weight: 900;
}

.customer-address-current-area span:nth-child(2) {
    display: grid;
    min-width: 0;
}

.customer-address-current-area small {
    color: #6a7b71;
    font-size: .74rem;
}

.customer-address-current-area strong {
    overflow: hidden;
    color: #163f2d;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-address-current-area a {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--address-green);
    font-weight: 800;
    line-height: 44px;
}

.customer-address-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.customer-address-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 16px;
    overflow: hidden;
    border: 1px solid #dce8e0;
    border-radius: 18px;
    background: linear-gradient(145deg, #fff 0%, #fbfefc 100%);
    box-shadow: 0 8px 24px rgba(17, 70, 43, .055);
}

.customer-address-card.is-selected {
    border-color: #5abc82;
    box-shadow: inset 0 0 0 1px #5abc82;
    background: linear-gradient(145deg, #fff 0%, #f3fcf6 100%);
}

.customer-address-card.is-incompatible {
    background: #fafbfa;
}

.customer-address-card__top {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.customer-address-card__icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: var(--address-mint);
    color: var(--address-green);
}

.customer-address-card__icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.customer-address-card__title > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.customer-address-card h3 {
    font-size: 1.03rem;
}

.customer-address-card__title p {
    overflow: hidden;
    margin: 3px 0 0;
    color: #5f7067;
    font-size: .84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-address-badge {
    padding: 3px 7px;
    border-radius: 999px;
    background: #e9f2ec;
    color: #4a6757;
    font-size: .67rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.customer-address-badge--selected {
    background: #dff6e8;
    color: #08723e;
}

.customer-address-card__address {
    display: -webkit-box;
    min-height: 44px;
    margin: 12px 0 9px;
    overflow: hidden;
    color: #344d40;
    font-size: .9rem;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.customer-address-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.customer-address-card__meta span {
    padding: 5px 8px;
    border-radius: 8px;
    background: #f1f4f2;
    color: #586c60;
    font-size: .72rem;
    font-weight: 800;
}

.customer-address-card__meta .has-pin {
    background: #e7f8ed;
    color: #08713e;
}

.customer-address-card__meta .needs-pin {
    background: #fff2de;
    color: #8c5a05;
}

.customer-address-card__warning {
    margin: 10px 0 0;
    padding: 8px 10px;
    border-radius: 9px;
    background: #fff7e8;
    color: #7c570e;
    font-size: .76rem;
    line-height: 1.45;
}

.customer-address-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: auto;
    padding-top: 14px;
}

.customer-address-card__actions form {
    margin: 0;
}

.customer-address-card__actions .button,
.customer-address-text-action,
.customer-address-selected-label {
    min-height: 44px;
}

.customer-address-card__actions .button {
    padding-inline: 13px;
}

.customer-address-selected-label {
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    border-radius: 10px;
    background: #e6f7ec;
    color: #08723e;
    font-size: .78rem;
    font-weight: 900;
}

.customer-address-text-action {
    appearance: none;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: #416253;
    cursor: pointer;
    font: inherit;
    font-size: .8rem;
    font-weight: 800;
}

.customer-address-text-action--danger {
    color: #a23832;
}

.customer-address-form {
    display: grid;
    gap: 17px;
}

.customer-address-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.customer-address-form .field-group {
    display: grid;
    gap: 7px;
}

.customer-address-form .field-group--full {
    grid-column: 1 / -1;
}

.customer-address-form label {
    color: #244c37;
    font-weight: 800;
}

.customer-address-form label span {
    color: #7b8a82;
    font-size: .75rem;
    font-weight: 600;
}

.customer-address-form input:not([type='hidden']):not([type='checkbox']),
.customer-address-form select {
    width: 100%;
    min-height: 48px;
    padding: 0 13px;
    border: 1px solid #cddbd2;
    border-radius: 11px;
    background: #fff;
    color: #173d2b;
    font: inherit;
    outline: none;
}

.customer-address-form select {
    appearance: none;
    padding-right: 44px;
    background-image: linear-gradient(45deg, transparent 50%, #3f6250 50%), linear-gradient(135deg, #3f6250 50%, transparent 50%);
    background-position: calc(100% - 19px) 21px, calc(100% - 13px) 21px;
    background-repeat: no-repeat;
    background-size: 6px 6px, 6px 6px;
}

.customer-address-form input:focus,
.customer-address-form select:focus {
    border-color: #29a363;
    box-shadow: 0 0 0 3px rgba(31, 151, 84, .13);
}

.customer-address-area-trigger[hidden],
.customer-address-area-sheet[hidden],
.customer-address-area-sheet__backdrop[hidden],
.customer-address-area-search [hidden],
.customer-address-area-group[hidden],
.customer-address-area-option[hidden],
.customer-address-area-empty[hidden] {
    display: none !important;
}

.customer-address-area-picker {
    --address-green: #0c7a43;
    --address-green-dark: #075b33;
}

.customer-address-area-trigger {
    display: grid;
    width: 100%;
    min-height: 58px;
    grid-template-columns: 38px minmax(0, 1fr) 24px;
    gap: 10px;
    align-items: center;
    padding: 8px 11px;
    border: 1px solid #cddbd2;
    border-radius: 13px;
    background: linear-gradient(145deg, #fff 0%, #f5fbf7 100%);
    color: #173d2b;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.customer-address-area-trigger:hover {
    border-color: #94c9aa;
}

.customer-address-area-trigger:focus-visible,
.customer-address-area-trigger[aria-invalid='true'] {
    border-color: #20985a;
    box-shadow: 0 0 0 3px rgba(31, 151, 84, .13);
    outline: none;
}

.customer-address-area-trigger__icon,
.customer-address-area-group__icon {
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #e1f5e8;
    color: var(--address-green);
}

.customer-address-area-trigger__icon {
    width: 38px;
    height: 38px;
}

.customer-address-area-trigger__icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.customer-address-area-trigger__copy {
    display: grid;
    min-width: 0;
    gap: 1px;
}

.customer-address-area-trigger__copy small {
    color: #708178;
    font-size: .69rem;
    font-weight: 700;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.customer-address-area-trigger__copy strong {
    overflow: hidden;
    color: #173d2b;
    font-size: .9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-address-area-trigger__chevron {
    color: #3c6650;
    font-size: 1.25rem;
    font-weight: 900;
    text-align: center;
    transition: transform .18s ease;
}

.customer-address-area-trigger[aria-expanded='true'] .customer-address-area-trigger__chevron {
    transform: rotate(180deg);
}

.customer-address-area-sheet {
    position: fixed;
    z-index: 1200;
    inset: 0;
    display: grid;
    align-items: end;
    justify-items: center;
    padding: 12px;
}

.customer-address-area-sheet__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(7, 28, 18, .56);
    cursor: pointer;
}

.customer-address-area-sheet__dialog {
    position: relative;
    display: flex;
    width: min(100%, 660px);
    max-height: min(78vh, 680px);
    max-height: min(78dvh, 680px);
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(210, 229, 218, .95);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 31, 17, .3);
}

.customer-address-area-sheet__header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 19px 19px 14px;
    border-bottom: 1px solid #e5eee8;
    background: linear-gradient(145deg, #fff 0%, #f2faf5 100%);
}

.customer-address-area-sheet__header h3 {
    margin: 2px 0 0;
    color: #113d29;
    font-size: 1.25rem;
}

.customer-address-area-sheet__header p:last-child {
    margin: 5px 0 0;
    color: #687a70;
    font-size: .82rem;
}

.customer-address-area-sheet__close {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #d8e5dd;
    border-radius: 50%;
    background: #fff;
    color: #315542;
    cursor: pointer;
    font: inherit;
    font-size: 1.45rem;
}

.customer-address-area-search {
    display: grid;
    min-height: 50px;
    flex: 0 0 auto;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin: 12px 15px 0;
    padding: 2px 3px 2px 13px;
    border: 1px solid #cfe0d5;
    border-radius: 14px;
    background: linear-gradient(145deg, #fff 0%, #f6fbf8 100%);
    color: #547164;
    box-shadow: 0 5px 16px rgba(20, 78, 45, .06);
    transition: border-color .16s ease, box-shadow .16s ease;
}

.customer-address-area-search:focus-within {
    border-color: #42a871;
    box-shadow: 0 0 0 3px rgba(31, 151, 84, .12), 0 7px 18px rgba(20, 78, 45, .08);
}

.customer-address-area-search > svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.customer-address-area-search input[type='search'],
.customer-address-form .customer-address-area-search input[type='search'] {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #173d2b;
    font: inherit;
    font-size: 16px;
}

.customer-address-area-search input[type='search']::-webkit-search-cancel-button,
.customer-address-form .customer-address-area-search input[type='search']::-webkit-search-cancel-button {
    display: none;
}

.customer-address-area-search button {
    display: grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 11px;
    background: #e7f5ec;
    color: #1b7546;
    cursor: pointer;
    font: inherit;
    font-size: 1.25rem;
    font-weight: 700;
}

.customer-address-area-search button:hover,
.customer-address-area-search button:focus-visible {
    background: #d8efdf;
    outline: none;
}

.customer-address-area-options {
    display: grid;
    gap: 16px;
    padding: 15px;
    overflow: auto;
    overscroll-behavior: contain;
}

.customer-address-area-empty {
    display: grid;
    min-height: 190px;
    place-items: center;
    align-content: center;
    gap: 5px;
    padding: 24px;
    border: 1px dashed #cbded2;
    border-radius: 16px;
    background: #f8fcf9;
    color: #667b6f;
    text-align: center;
}

.customer-address-area-empty > span {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
    place-items: center;
    border-radius: 50%;
    background: #e5f4ea;
    color: #167a46;
    font-size: 1.5rem;
}

.customer-address-area-empty strong {
    color: #244b36;
    font-size: .92rem;
}

.customer-address-area-empty small {
    font-size: .75rem;
}

.customer-address-area-group {
    display: grid;
    gap: 10px;
}

.customer-address-area-group > header {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding-inline: 3px;
}

.customer-address-area-group__icon {
    width: 34px;
    height: 34px;
    font-weight: 900;
}

.customer-address-area-group > header > span:last-child {
    display: grid;
}

.customer-address-area-group > header strong {
    color: #183f2d;
    font-size: .9rem;
}

.customer-address-area-group > header small {
    color: #72837a;
    font-size: .72rem;
}

.customer-address-area-group__items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.customer-address-area-option {
    display: grid;
    min-height: 70px;
    grid-template-columns: minmax(0, 1fr) auto 24px;
    gap: 9px;
    align-items: center;
    padding: 10px 11px;
    border: 1px solid #dce8e0;
    border-radius: 14px;
    background: #fff;
    color: #173d2b;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.customer-address-area-option:hover,
.customer-address-area-option:focus-visible {
    border-color: #79bd96;
    outline: none;
    box-shadow: 0 7px 20px rgba(15, 104, 57, .09);
}

.customer-address-area-option.is-selected {
    border-color: #35a269;
    background: #f0faf4;
    box-shadow: inset 0 0 0 1px #35a269;
}

.customer-address-area-option__copy,
.customer-address-area-option__fee {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.customer-address-area-option__copy strong {
    overflow: hidden;
    font-size: .9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customer-address-area-option__copy small,
.customer-address-area-option__fee small {
    color: #78887f;
    font-size: .68rem;
}

.customer-address-area-option__fee {
    justify-items: end;
    color: #0b7040;
    white-space: nowrap;
}

.customer-address-area-option__fee strong {
    font-size: .85rem;
}

.customer-address-area-option__check {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border: 1px solid #cddbd2;
    border-radius: 50%;
    color: transparent;
    font-size: .72rem;
    font-weight: 900;
}

.customer-address-area-option.is-selected .customer-address-area-option__check {
    border-color: #188a50;
    background: #188a50;
    color: #fff;
}

.customer-address-form__map {
    padding: 13px;
    border: 1px solid #d6e7dc;
    border-radius: 15px;
    background: #f7fbf8;
}

.customer-address-map__summary {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
}

.customer-address-map__summary-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: #daf3e3;
    color: var(--address-green);
    font-size: 1.35rem;
    font-weight: 900;
}

.customer-address-map__summary > span:nth-child(2) {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.customer-address-map__summary small {
    color: #61746a;
    font-size: .78rem;
    line-height: 1.4;
}

.customer-address-map__panel {
    margin-top: 13px;
}

.customer-address-map__privacy {
    margin: 10px 0 0;
    color: #62736a;
    font-size: .76rem;
    line-height: 1.45;
}

.customer-address-default-check {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 13px;
    border: 1px solid #d8e7de;
    border-radius: 13px;
    background: #fafdfb;
    cursor: pointer;
}

.customer-address-default-check input {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: var(--address-green);
}

.customer-address-default-check span {
    display: grid;
    gap: 2px;
}

.customer-address-default-check small {
    color: #6b7c72;
    font-weight: 500;
}

.customer-address-save {
    min-height: 52px;
    font-size: 1rem;
}

@media (max-width: 720px) {
    .customer-address-page {
        gap: 12px;
    }

    .customer-address-section,
    .customer-address-editor {
        border-radius: 16px;
    }

    .customer-address-section,
    .customer-address-editor {
        padding: 16px;
    }

    .customer-address-list,
    .customer-address-form__grid {
        grid-template-columns: 1fr;
    }

    .customer-address-form .field-group--full {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .customer-address-current-area {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .customer-address-current-area > span:first-child {
        width: 38px;
        height: 38px;
    }

    .customer-address-current-area a {
        grid-column: 2;
        justify-self: start;
        min-height: 36px;
        padding: 0;
        line-height: 36px;
    }

    .customer-address-map__summary {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .customer-address-map__summary .button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .customer-address-card__actions {
        gap: 5px;
    }

    .customer-address-area-sheet {
        padding: 8px;
    }

    .customer-address-area-sheet__dialog {
        max-height: 82vh;
        max-height: 82dvh;
        border-radius: 21px;
    }

    .customer-address-area-search {
        margin: 10px 12px 0;
    }

    .customer-address-area-group__items {
        grid-template-columns: 1fr;
    }
}
