/* Saved addresses: cabinet "Ünvanlarım", checkout address choice, address form (resources/views/site/partials/address_fields.blade.php). */
.zd-addresses__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.zd-addresses__head h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #04251c;
}
.zd-addresses__intro {
    margin: 0 0 18px;
    color: #666;
    font-size: 14px;
}
.zd-flash {
    display: none;
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    background: #eef7f1;
    color: #0e5542;
}
.zd-flash.is-error {
    background: #fdeeee;
    color: #b42318;
}

.zd-address-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}
.zd-address-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 16px 18px 12px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.zd-address-card:hover {
    border-color: #c8c8c8;
    box-shadow: 0 4px 14px rgba(4, 37, 28, .06);
}
.zd-address-card.is-default {
    border-color: #04251c;
}
.zd-address-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}
.zd-address-card__title {
    margin-right: auto;
    font-size: 15px;
    font-weight: 700;
    color: #04251c;
}
.zd-address-card__title i {
    margin-right: 4px;
    color: #ff4a00;
}
.zd-address-card__line {
    flex: 1;
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    word-break: break-word;
}
.zd-address-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding-top: 10px;
    border-top: 1px dashed #e1e1e1;
}
.zd-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    white-space: nowrap;
}
.zd-badge--default {
    background: #04251c;
    color: #fff;
}
.zd-badge--geo {
    background: #fff1ea;
    color: #c63a00;
}
.zd-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 0;
    border: 0;
    background: none;
    font-size: 13px;
    font-weight: 500;
    color: #04251c;
    cursor: pointer;
    text-decoration: none;
}
.zd-link:hover,
.zd-link:focus {
    color: #ff4a00;
    outline: 0;
}
.zd-link--danger:hover {
    color: #d92d20;
}
.zd-link--muted {
    color: #777;
}
.zd-address-empty {
    grid-column: 1 / -1;
    padding: 34px 16px;
    border: 1px dashed #d5d5d5;
    border-radius: 8px;
    text-align: center;
    color: #777;
}
.zd-address-empty i {
    font-size: 34px;
    color: #ff4a00;
    margin-bottom: 10px;
}
.zd-address-empty p {
    margin: 0;
}

/* Form */
.zd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.zd-chip {
    padding: 5px 16px;
    border: 1px solid #d5d5d5;
    border-radius: 18px;
    background: #fff;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    transition: all .2s;
}
.zd-chip:hover {
    border-color: #04251c;
}
.zd-chip.is-active {
    border-color: #04251c;
    background: #04251c;
    color: #fff;
}
.zd-address-fields .form-group {
    margin-bottom: 12px;
}
.zd-address-fields label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: #444;
}
.zd-address-fields .form-control.is-invalid {
    border-color: #d92d20;
}
.zd-field-error {
    margin-top: 4px;
    font-size: 12px;
    color: #d92d20;
}
.zd-field-error:empty {
    display: none;
}
/* Address search: field, suggestions, "Olduğum yeri tap" / "Xəritədə göstər", map */
.zd-address-fields [hidden] {
    display: none !important;
}
.zd-addr-search__box {
    position: relative;
}
.zd-addr-search__icon {
    position: absolute;
    top: 50%;
    left: 15px;
    z-index: 1;
    transform: translateY(-50%);
    font-size: 16px;
    color: #7b8682;
    pointer-events: none;
}
.zd-address-fields .zd-addr-search__box input.form-control {
    height: 52px;
    padding-left: 44px;
    padding-right: 76px;
    font-size: 16px;
}
.zd-addr-search__clear {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 36px;
    height: 36px;
    margin-top: -18px;
    border: 0;
    border-radius: 50%;
    background: none;
    font-size: 24px;
    line-height: 36px;
    color: #9aa3a0;
    cursor: pointer;
}
.zd-addr-search__clear:hover,
.zd-addr-search__clear:focus-visible {
    background: #f0f3f2;
    color: #1d2623;
    outline: 0;
}
.zd-addr-search__spinner {
    display: none;
    position: absolute;
    top: 50%;
    right: 48px;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border: 2px solid #d3d9d6;
    border-top-color: #04251c;
    border-radius: 50%;
    animation: zd-addr-spin .7s linear infinite;
}
.zd-addr-search__box.is-loading .zd-addr-search__spinner {
    display: block;
}
@keyframes zd-addr-spin {
    to {
        transform: rotate(360deg);
    }
}
.zd-suggest {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: 340px;
    padding: 4px;
    overflow-y: auto;
    border: 1px solid #d3d9d6;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(4, 37, 28, .16);
}
.zd-suggest__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 8px;
    background: none;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.zd-suggest__item > i {
    margin-top: 3px;
    font-size: 16px;
    color: #ff4a00;
}
.zd-suggest__text {
    min-width: 0;
}
.zd-suggest__text b {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #1d2623;
}
.zd-suggest__text small {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.35;
    color: #7b8682;
}
.zd-suggest__item:hover,
.zd-suggest__item.is-active {
    background: #e9f2ee;
}
.zd-suggest__empty {
    padding: 12px;
    font-size: 14px;
    line-height: 1.45;
    color: #4a5551;
}
.zd-suggest__map {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 4px;
    padding: 12px;
    border: 0;
    border-top: 1px solid #e4e8e6;
    background: none;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    color: #04251c;
    cursor: pointer;
}
.zd-suggest__map i {
    font-size: 16px;
    color: #ff4a00;
}
.zd-suggest__map:hover {
    background: #f5f7f6;
}
/* Google's terms: its name under suggestions that are not on a Google map. */
.zd-suggest__powered {
    padding: 6px 12px 4px;
    font-family: Roboto, Arial, sans-serif;
    font-size: 11px;
    text-align: right;
    color: #5f6368;
}
.zd-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.4;
    color: #7b8682;
}
.zd-hint.is-ok {
    color: #0e7a3e;
}
.zd-hint.is-warn {
    color: #b45309;
}
.zd-hint.is-error {
    color: #d92d20;
}
.zd-addr-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}
.zd-addr-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px dashed #c5cfcb;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    text-align: left;
    color: #04251c;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.zd-addr-action:hover,
.zd-addr-action:focus-visible {
    border-color: #04251c;
    background: #f5f7f6;
    outline: 0;
}
.zd-addr-action > i {
    width: 22px;
    font-size: 19px;
    text-align: center;
    color: #ff4a00;
}
.zd-addr-action b {
    display: block;
    font-size: 14px;
    font-weight: 600;
}
.zd-addr-action small {
    display: block;
    font-size: 12px;
    color: #7b8682;
}
.zd-addr-action.is-loading > i {
    animation: zd-addr-pulse 1s ease-in-out infinite;
}
@keyframes zd-addr-pulse {
    50% {
        opacity: .3;
    }
}
.zd-addr-map {
    margin: 0 0 14px;
}
.zd-map {
    position: relative;
    z-index: 0; /* the map's layers stay under the suggestion list */
    height: 260px;
    margin-bottom: 8px;
    border: 1px solid #e4e8e6;
    border-radius: 10px;
    overflow: hidden;
    background: #e8ecec;
}
.zd-addr-map__note {
    margin-bottom: 6px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f5f7f6;
    font-size: 13px;
    line-height: 1.45;
    color: #4a5551;
}
.zd-addr-map__note.is-ok {
    background: #edf7ea;
    color: #256f19;
}
.zd-addr-map__note.is-warn {
    background: #fff6e5;
    color: #92400e;
}
.zd-addr-map__note.is-ok:before {
    content: '\2713';
    margin-right: 6px;
    font-weight: 700;
}

/* Popup (Wolmart.popup / Magnific inline) */
.zd-address-popup {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 20px auto;
    padding: 26px 24px 20px;
    border-radius: 10px;
    background: #fff;
}
.zd-address-popup h4 {
    margin: 0 0 16px;
    padding-right: 48px;
    line-height: 36px;
    font-size: 19px;
    font-weight: 700;
    color: #04251c;
}
/* The theme puts its close button above the popup and moves it 2.7rem up while pressed (.mfp-close:active),
   so inside this popup the press ended outside the button and the click never closed it. */
.zd-address-popup .mfp-close,
.zd-address-popup .mfp-close:active,
.zd-address-popup .mfp-close:hover {
    top: 14px;
    right: 14px;
    left: auto;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background: #f1f4f2;
    color: transparent;
    font-size: 0;
    line-height: 0;
    opacity: 1;
    transform: none;
    cursor: pointer;
    transition: background-color .2s;
}
.zd-address-popup .mfp-close:hover,
.zd-address-popup .mfp-close:focus-visible {
    background: #e2e8e4;
}
.zd-address-popup .mfp-close::before,
.zd-address-popup .mfp-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    margin: -1px 0 0 -8px;
    border-radius: 2px;
    background: #04251c;
    transform: rotate(45deg);
}
.zd-address-popup .mfp-close::after {
    transform: rotate(-45deg);
}
.zd-popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.zd-popup-actions .btn {
    min-width: 140px;
}
.zd-form-error {
    margin-top: 10px;
    font-size: 13px;
    color: #d92d20;
}
.zd-form-error:empty {
    display: none;
}

/* Checkout: saved address choice */
.zd-address-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.zd-address-option {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
}
.zd-address-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.zd-address-option__body {
    display: block;
    height: 100%;
    padding: 12px 14px 12px 40px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.zd-address-option__body:before {
    content: '';
    position: absolute;
    top: 15px;
    left: 14px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px #555;
    transition: box-shadow .2s;
}
.zd-address-option input:checked + .zd-address-option__body {
    border-color: #04251c;
    box-shadow: 0 0 0 1px #04251c;
}
.zd-address-option input:checked + .zd-address-option__body:before {
    box-shadow: inset 0 0 0 4px #04251c;
}
.zd-address-option input:focus-visible + .zd-address-option__body {
    outline: 2px solid #ff4a00;
    outline-offset: 2px;
}
.zd-address-option__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    font-weight: 700;
    color: #04251c;
}
.zd-address-option__line {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    color: #444;
    word-break: break-word;
}
/* Checkout: "Yeni ünvan əlavə et" (opens the popup) */
.zd-add-address {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    padding: 12px 16px;
    border: 1.5px dashed #b9c7bf;
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #1f7a4c;
    cursor: pointer;
    transition: border-color .2s, background-color .2s;
}
.zd-add-address:hover,
.zd-add-address:focus-visible {
    border-color: #1f7a4c;
    background: #f3f8f5;
}
.zd-add-address[hidden] {
    display: none;
}
.zd-address-none {
    margin: 0 0 12px;
    font-size: 14px;
    color: #5b6662;
}
.zd-checkout-address .zd-field-error:not(:empty) {
    margin: 0 0 10px;
}
/* Checkout: the guest's address from the popup */
.zd-address-pick {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1.5px solid #1f7a4c;
    border-radius: 10px;
    background: #fff;
}
.zd-address-pick[hidden] {
    display: none;
}
.zd-address-pick__icon {
    flex: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e8f3ec;
    color: #1f7a4c;
    line-height: 34px;
    text-align: center;
}
.zd-address-pick__body {
    flex: 1;
    min-width: 0;
}
.zd-address-pick__title {
    display: block;
    margin-bottom: 2px;
    font-weight: 700;
    color: #04251c;
}
.zd-address-pick__line {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    color: #444;
    word-break: break-word;
}

@media (max-width: 767px) {
    .zd-map {
        height: 230px;
    }
    .zd-address-popup {
        padding: 22px 16px 16px;
        margin: 10px auto;
    }
    .zd-popup-actions .btn {
        flex: 1;
        min-width: 0;
    }
}

/* The cabinet theme colours every span inside .account (#ccc); keep this component's own colours. */
.zd-address-card .zd-address-card__title,
.zd-address-option .zd-address-option__title {
    color: #04251c;
}
.zd-address-option .zd-address-option__line {
    color: #444;
}
.zd-badge.zd-badge--default {
    color: #fff;
}
.zd-badge.zd-badge--geo {
    color: #c63a00;
}
.zd-address-fields .zd-link span,
.zd-address-card .zd-link span {
    color: inherit;
}
.zd-address-fields .form-control {
    color: #333;
}
.zd-address-fields .form-control::placeholder {
    color: #aaa;
}
