/* ── Compact "currently selected" address card ───────────────────────────── */
.address-picker-card {
    background: #fff;
    border: 1px solid #e1ecff;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 16px;
}

.address-picker-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.address-picker-card__header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 15px;
    color: #0b0b0b;
}

.address-picker-edit-link {
    background: none;
    border: none;
    color: #3cb46e;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    padding: 0;
}

.address-picker-edit-link:hover {
    color: #2a8a52;
    text-decoration: underline;
}

.address-picker-card__name {
    font-weight: 700;
    font-size: 14px;
    color: #0b0b0b;
}

.address-picker-card__name span {
    font-weight: 400;
    color: #475569;
    margin-left: 10px;
}

.address-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 3px 9px;
    border-radius: 4px;
    white-space: nowrap;
}

.address-badge-home {
    background: #dcfce7;
    color: #15803d;
}

.address-badge-office {
    background: #e0e7ff;
    color: #4338ca;
}

.address-badge-default {
    background: #fff;
    color: #3cb46e;
    border: 1px solid #3cb46e;
}

.address-badge-incomplete {
    background: #fef3c7;
    color: #b45309;
}

.address-picker-card__text {
    font-size: 13px;
    color: #475569;
    margin-top: 6px;
    line-height: 1.5;
}

.address-picker-empty {
    text-align: center;
    padding: 20px 10px;
}

.address-picker-empty p {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 10px;
}

/* ── Shared modal overlay/content (matches track-order / product-variant) ── */
.address-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.address-modal-content {
    background: #fff;
    border-radius: 10px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.address-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e1ecff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f6f9ff;
    border-radius: 10px 10px 0 0;
    flex-shrink: 0;
}

.address-modal-header h3 {
    margin: 0;
    color: #0b0b0b;
    font-weight: 700;
    font-size: 19px;
}

.address-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.address-modal-close:hover {
    color: #e76026;
}

.address-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    overflow-x: hidden;
}

.address-modal-footer {
    padding: 14px 22px;
    border-top: 1px solid #e1ecff;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.address-modal-footer .btn-cancel {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 8px 22px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}

.address-modal-footer .btn-save {
    background: #3cb46e;
    color: #fff;
    border: none;
    padding: 8px 26px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
}

.address-modal-footer .btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Add-new-address link at the top of the list popup ───────────────────── */
.address-add-new {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3cb46e;
    font-weight: 700;
    font-size: 13.5px;
    background: none;
    border: none;
    padding: 10px 0 16px;
    cursor: pointer; 
    margin-bottom: 5px;
}

.address-add-new i {
    box-sizing: border-box;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px dashed #3cb46e;
    border-radius: 50%;
}

/* ── Radio-selectable address rows in the list popup ──────────────────────── */
.address-list-item {
    display: flex;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
    gap: 14px;
    border: 1px solid #e1ecff;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.address-list-item:hover {
    border-color: #3cb46e;
}

.address-list-item.is-selected {
    border-color: #3cb46e;
    background: #f0faf3;
}

/* Pin the radio to a fixed, small size — without this, a broader/global
   input[type="radio"] style elsewhere in the app can inflate it to the
   point of squeezing the address text into a single-word-per-line column. */
.address-list-item input[type="radio"] {
    -webkit-appearance: radio;
    appearance: radio;
    margin: 4px 0 0;
    accent-color: #3cb46e;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    min-width: 16px;
    max-width: 16px;
}

.address-list-item__body {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: break-word;
}

.address-list-item__name {
    font-weight: 700;
    font-size: 14px;
    color: #0b0b0b;
}

.address-list-item__name span {
    font-weight: 400;
    color: #475569;
    margin-left: 8px;
}

.address-list-item__badges {
    margin: 8px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.address-list-item__text {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
}

.address-list-item__actions {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
}

.address-list-item__actions button {
    width: 30px;
    height: 30px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
}
.address-list-item__actions button.address_edit_btn{
    border:1px solid #3cb46e;
    color: #3cb46e;
}
.address-list-item__actions button.address_delete_btn{
    border:1px solid red;
    color: red;
}

.address-list-item__actions button.address_edit_btn:hover {
    background: #3cb46e; color: #fff;
}
.address-list-item__actions button.address_delete_btn:hover {
    background: red; color: #fff;
}


/* ── Add/edit address form ─────────────────────────────────────────────────── */
.address-form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.address-form-row > div {
    flex: 1 1 0;
}

.address-form-group label {
    display: block;
    font-weight: 600;
    font-size: 12.5px;
    color: #334155;
    margin-bottom: 5px;
}

.address-form-group .form-control {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13.5px;
    padding: 8px 12px;
    height: auto;
}

.address-type-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.address-type-toggle button {
    flex: 1;
    padding: 8px 0;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.address-type-toggle button.active {
    border-color: #3cb46e;
    background: #f0faf3;
    color: #2a8a52;
}

@media (max-width: 576px) {
    .address-form-row {
        flex-direction: column;
        gap: 0;
    }

    /* The picker already sits inside a padded card inside a padded grid
       column, so its own side padding is pure waste on a narrow screen —
       it left the address text about 140px to wrap in. */
    .address-modal-body {
        padding: 12px 0;
    }

    .address-list-item {
        gap: 10px;
        padding: 12px;
    }

    .address-list-item__actions {
        flex-direction: column;
    }
}
