/* Shipping Addresses Styles - matches invoices/orders styling */

.woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
}

.woocommerce-orders-table thead {
    background-color: #f9f9f9;
}

.woocommerce-orders-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
}

.woocommerce-orders-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.woocommerce-orders-table tr:hover {
    background-color: #fafafa;
}

.merida-order-link {
    color: var(--global-palette-highlight, #0055ff);
    text-decoration: none;
    transition: color 0.2s ease;
}

.merida-order-link:hover {
    color: var(--global-palette-highlight-alt, #0033cc);
    text-decoration: underline;
}

.merida-delete-address {
    color: #d32f2f;
}

.merida-delete-address:hover {
    color: #b71c1c;
}

/* Responsive table */
@media screen and (max-width: 768px) {
    .woocommerce-orders-table thead {
        display: none;
    }

    .woocommerce-orders-table tr {
        display: block;
        margin-bottom: 1.5em;
        border: 1px solid #e0e0e0;
        border-radius: 4px;
    }

    .woocommerce-orders-table td {
        display: block;
        text-align: right;
        padding: 8px 12px;
        border-bottom: 1px solid #f5f5f5;
    }

    .woocommerce-orders-table td:last-child {
        border-bottom: none;
    }

    .woocommerce-orders-table td::before {
        content: attr(data-title);
        float: left;
        font-weight: 600;
        color: #333;
    }

    .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions {
        text-align: center;
    }

    .woocommerce-orders-table td.woocommerce-orders-table__cell-order-actions::before {
        display: none;
    }
}

/* Modal Styles */
.merida-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.merida-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 24px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.merida-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.merida-modal-close:hover,
.merida-modal-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.merida-modal-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.merida-form-group {
    margin-bottom: 15px;
}

.merida-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.merida-form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.merida-form-actions {
    margin-top: 20px;
    text-align: right;
}

.merida-input-error {
    border-color: #f44336 !important;
    background-color: #ffebee !important;
}

/* Toast Notification */
.merida-toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 9999;
    left: 50%;
    transform: translateX(-50%);
    bottom: 30px;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.merida-toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

.merida-toast.success {
    background-color: #4CAF50;
    /* Green */
}

.merida-toast.error {
    background-color: #f44336;
    /* Red */
}