/* Custom styles for the orders table and popup */
:root {
    --sda-td-bg1: #006a3b;
    --sda-th-bg1: #f4f4f4;
    --sda-submit-btn: #007bff;
}

.sda_table {
    width: 100%;
    border-collapse: collapse;

    thead,
    th {
        /* background: var(--sda-td-bg1) !important; */
        color: white;
        font-weight: 500 !important;
    }

    .sda_response i {
        font-family: dashicons;
    }
}

#sda_advice_table_filter,
#sda_advice_response_table_filter,
#sda_orders_table_filter {
    width: 50%;

    label {
        text-align: end !important;
        justify-content: end;
        display: flex;
        gap: 2px;
        width: fit-content;
        display: flex;
        align-items: center;

        select,
        input {
            width: 50px;
            height: 35px;
        }

        input {
            width: 100%;
            max-width: 250px;
        }
    }
}

#sda_advice_table_length,
#sda_advice_response_table_length,
#sda_orders_table_length {
    width: 50%;

    label {
        display: flex;
        gap: 2px;
        text-align: center;
        align-items: center;

        select,
        input {
            width: 50px;
            height: 35px;
        }
    }
}

.sda_table th,
.sda_table td {
    padding: 10px;
    border: none;
    text-align: left;
}

.sda_table th {
    background-color: var(--sda-th-bg1);
}

.sda_table .sda_response a span {
    font-family: dashicons;
    line-height: 1;
    font-size: 15px;
}

/* Overlay Background */
#sda_modalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}

/* Popup Modal */
#sda_customPrompt {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    height: fit-content;
    overflow-x: auto;
    max-height: 90vh;
    gap: 9px;
}

/* Modal Title */
.sda_modalTitle {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    margin: 0px;
}

/* Input Fields */
#sda_orderInput,
#sda_orderMessage {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 10px;
}
#sda_orderMessage{
    min-height: 80px;
}
/* Buttons */
#sda_submitOrder,
#sda_closePrompt {
    width: 100%;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    text-align: center;
}

#sda_submitOrder {
    background: var(--sda-submit-btn);
    color: white;
    margin-bottom: 5px;
}

#sda_closePrompt {
    background: #ccc;
}

/* Responsive Design */
@media (min-width: 1000px) {
    .sda_column_content {
        max-width: 210px;
    }
}

@media (max-width: 767px) {
    .sda_shipper_advice_btn {
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    #sda_customPrompt {
        width: 95%;
        padding: 15px;
    }
}

.woocommerce-MyAccount-navigation-link--shipper_advices a::before {
    content: "\e954" !important;
}

.sda_content {
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

#sda_reason {
    width: 100%;
    border: 1px solid lightgray;
    border-radius: 5px;
}

.sda-comments-count {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    position: absolute;
    left: 100%;
    width: 20px;
    height: 20px;
    top: -7px;
    background: green;
    color: white;
    font-weight: normal;
    font-family: sans-serif;
}

.woocommerce-MyAccount-navigation-link--shipper_advices a::after {
    max-width: 30px !important;
    max-height: 30px !important;
    min-height: 20px;
    min-width: 20px;
    display: inline-flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    background: var(--sda-submit-btn);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-family: sans-serif;
    animation: sda_pulse 0.4s infinite alternate ease-in-out;
}