/* ---------- Tabs ---------- */

.ma-tabs {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #e2e2e2;
    margin-bottom: 16px;
}

.ma-tab-btn {
    background: none;
    border: none;
    padding: 10px 2px;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.ma-tab-btn.is-active {
    color: #333;
    border-bottom-color: #6b7d5a;
}

/* ---------- Address list (compact rows) ---------- */

.ma-address-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ma-row-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.ma-row-label {
    font-size: 14px;
    font-weight: 600;
}

.ma-row-summary:last-of-type {
    margin-bottom: 0;
}

.ma-address-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    background: #fff;
}

.ma-address-card-default {
    border-color: #a9c4de;
}

.ma-row-hidden {
    display: none;
}

.ma-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f2f4ef;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ma-address-card-default .ma-card-icon {
    background: #eaf0e5;
}

.ma-card-icon .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #888;
}

.ma-address-card-default .ma-card-icon .dashicons {
    color: #566a47;
}

.ma-card-body {
    flex: 1;
    min-width: 0;
}

.ma-row-contact {
    margin: 0 0 2px;
    font-size: 13px;
    color: #555;
}

.ma-row-divider {
    margin: 0 6px;
    color: #ccc;
}

.ma-row-summary {
    margin: 0 0 1px;
    font-size: 13px;
    color: #777;
}

.ma-row-summary:last-of-type {
    margin-bottom: 0;
}

.ma-badge-default {
    display: inline-block;
    background: #eaf0e5;
    color: #566a47;
    font-weight: 600;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
}

/* ---------- Row action icon buttons ---------- */

.ma-row-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.ma-icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    color: #555;
    background: #fff;
    text-decoration: none;
}

.ma-icon-btn-danger {
    color: #b3413f;
}

.ma-icon-btn {
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ma-icon-btn:hover {
    background: #eaf0e5;
    border-color: #6b7d5a;
    color: #566a47;
}

.ma-icon-btn-danger:hover {
    background: #fbeceb;
    border-color: #b3413f;
    color: #b3413f;
}

/* ---------- Show more / add address buttons ---------- */

.ma-show-more,
.ma-add-address-btn {
    display: block;
    text-align: center;
    padding: 10px;
    border: 1px dashed #c7cfc0;
    border-radius: 6px;
    background: none;
    color: #6b7d5a;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.ma-show-more:hover,
.ma-add-address-btn:hover {
    background: #f2f4ef;
}

/* ---------- Form pages (Add / Edit address) buttons ---------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    background: #6b7d5a;
    color: #fff !important;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease;
    line-height: 1;
    cursor: pointer;
}

.button:hover {
    background: #566a47;
    color: #fff !important;
}

/* ---------- Confirm modal ---------- */

.ma-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ma-modal-box {
    background: #fff;
    border-radius: 10px;
    padding: 24px 26px;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.ma-modal-box p {
    margin: 0 0 20px;
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}

.ma-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.ma-modal-actions .button {
    margin: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 700px) {
    .ma-address-card {
        flex-wrap: wrap;
    }

    .ma-row-actions {
        width: 100%;
        justify-content: flex-end;
        padding-left: 48px;
    }
}

.ma-form-section {
    border-top: 1px solid #e2e2e2;
    padding-top: 20px;
    margin-bottom: 24px;
}

.ma-form-section:first-of-type {
    border-top: none;
    padding-top: 0;
}

.ma-form-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 14px;
}

.ma-form-section-label .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    color: #6b7d5a;
}

.ma-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ma-form-row-2 .form-row-wide {
    width: 100%;
    margin: 0 0 12px !important;
}

@media (max-width: 600px) {
    .ma-form-row-2 {
        grid-template-columns: 1fr;
    }
}

.ma-form-section-default .ma-form-section-label svg {
    width: 15px;
    height: 15px;
    color: #d4a72c;
    flex-shrink: 0;
    vertical-align: -3px;
    margin-right: 2px;
}

.ma-row-contact {
    margin: 0 0 2px;
    font-size: 13px;
    color: #555;
}

.ma-row-divider {
    margin: 0 6px;
    color: #ccc;
}

.ma-label-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ma-label-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #888;
    flex-shrink: 0;
}

.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    padding-right: 40px !important;
}

.ma-notice-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0;
}

.ma-notice-close:hover {
    opacity: 1;
}