/* Layout Three: Accordion-style vertical list */
.design_layout_three .mafwc-address-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.design_layout_three .mafwc-address-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.design_layout_three .mafwc-address-item.mafwc-default-address,
.design_layout_three .mafwc-address-item.mafwc-default-address .mafwc-address-summary {
    border-color: #0073aa;
    background-color: #f0f8ff;
}

.design_layout_three .mafwc-address-item[open] {
    border-color: #0073aa;
}

/* Summary (header) styles */
.design_layout_three .mafwc-address-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    background-color: #f9f9f9;
    list-style: none; /* Remove default marker */
}

.design_layout_three .mafwc-address-summary::-webkit-details-marker {
    display: none; /* Hide default arrow in WebKit */
}

.design_layout_three .mafwc-summary-details {
    flex: 1;
    line-height: 1.4;
    color: inherit; /* Inherit from theme */
}

.design_layout_three .mafwc-summary-details small {
    color: #666;
    opacity: 0.8; /* Subtle dim for previews, theme-inheritable */
}

.design_layout_three .mafwc-expand-icon {
    font-size: 12px;
    color: #666;
    margin-left: 10px;
}

.design_layout_three .mafwc-address-item[open] .mafwc-expand-icon {
    transform: rotate(180deg); /* Rotate on open */
}

/* Content styles (expanded) */
.design_layout_three .mafwc-address-content {
    padding: 15px;
    background-color: #fff;
    border-top: 1px solid #eee;
}

.design_layout_three .mafwc-address-details {
    margin-bottom: 10px;
    line-height: 1.5;
    color: inherit; /* Inherit from theme */
}

.design_layout_three .edit-links {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.design_layout_three .edit-links .button {
    padding: 6px 12px;
    font-size: 13px; /* Kept for button usability */
    border-radius: 4px;
    text-decoration: none;
    flex: none;
}

.design_layout_three .mafwc-view.button {
    background-color: #f0f0f0;
    color: #333;
    border:1px solid;
}

.design_layout_three .mafwc-use-this.button {
    background-color: #0073aa;
    color: #fff;
}

.design_layout_three .mafwc-manage.button {
    background-color: #000;
    color: #fff;
}

/* Manage panel (integrated into expanded content) */
.design_layout_three .mafwc-manage-panel {
    position: relative;
    background-color: #f9f9f9;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-top: 10px;
}

.design_layout_three .mafwc-manage-close {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 18px; /* Kept for close icon visibility */
    color: #666;
    cursor: pointer;
    line-height: 1;
    font-weight: bold;
}

.design_layout_three .mafwc-manage-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.design_layout_three .mafwc-manage-actions .button {
    padding: 5px 10px;
    font-size: 12px; /* Kept for button usability */
    flex: none;
}

.design_layout_three .mafwc-edit.button {
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
}

.design_layout_three .mafwc-delete.button {
    background-color: #d63638;
    color: #fff;
     text-decoration: none;
}

.design_layout_three .mafwc-set-default.button {
    background-color: #2ea2cc;
    color: #fff;
     text-decoration: none;
}

/* Responsive: Stack everything on small screens */
@media screen and (max-width: 768px) {
    .design_layout_three .mafwc-address-summary {
        padding: 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .design_layout_three .mafwc-expand-icon {
        align-self: flex-end;
        margin-left: 0;
    }

    .design_layout_three .edit-links,
    .design_layout_three .mafwc-manage-actions {
        justify-content: center;
    }

    .design_layout_three .edit-links .button,
    .design_layout_three .mafwc-manage-actions .button {
        flex: 1;
        min-width: 70px;
    }
}