/* ============================= */
/* BASE / DESKTOP VIEW */
/* ============================= */

.mcd-product-wrapper {
    overflow-x: auto;
}

/* Table */
.mcd-product-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.mcd-product-table th,
.mcd-product-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}

.mcd-product-table th {
    background: #f5f5f5;
    font-weight: bold;
}

/* WRING + PRODUCT (Desktop: two lines) */
.wring-product .wring {
    display: block;
    font-weight: bold;
}

.wring-product .product {
    display: block;
    font-size: 13px;
    color: #555;
}

/* Order checkbox */
.order-cell input[type="checkbox"] {
    transform: scale(1.2);
}

/* Qty controls */
.qty-cell button {
    padding: 2px 6px;
}

.qty-cell input.qty {
    width: 50px;
    text-align: center;
}

.qty-cell .unit {
    font-size: 12px;
    color: #555;
}

/* Low stock highlight */
.low-stock {
    background-color: #ffcccc !important;
}

/* Hide mobile-only labels on desktop */
.mobile-label {
    display: none;
}

/* ============================= */
/* SEARCH / FILTERS */
/* ============================= */

.mcd-search-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.mcd-search-filter input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.mcd-search-filter select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    min-width: 150px;
}

.mcd-search-filter input[type="text"]:focus,
.mcd-search-filter select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0,115,170,.3);
    outline: none;
}

/* ============================= */
/* PAGINATION */
/* ============================= */

.mcd-pagination {
    margin-top: 10px;
    text-align: center;
}

.mcd-pagination button {
    margin: 2px;
    padding: 5px 10px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
}

.mcd-pagination button.current {
    font-weight: bold;
    background: #ddd;
}

/* ============================= */
/* RESET BUTTON */
/* ============================= */

#mcd-reset-order {
    padding: 8px 16px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#mcd-reset-order:hover {
    background-color: #005177;
}

/* ============================= */
/* MOBILE VIEW (CARD LAYOUT) */
/* ============================= */
@media (max-width: 768px) {

    /* Hide headers */
    .mcd-product-table thead,
    .mcd-table-header {
        display: none !important;
    }

    /* Table becomes cards */
    .mcd-product-table,
    .mcd-product-table tbody,
    .mcd-product-table tr {
        display: block;
        width: 100%;
    }

    .mcd-product-table tr {
        border: 1px solid #ccc;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 10px;
        background: #fff;
    }

    .mcd-product-table td {
        display: block;
        border: none;
        padding: 0;
        margin: 0;
        text-align: left;
    }

    /* ============================= */
    /* ROW 1: WRING + PRODUCT */
    /* ============================= */
    .wring-product {
        font-size: 15px;
        font-weight: bold;
        margin-bottom: 8px;
    }

    .wring-product .wring::after {
        content: " / ";
        margin: 0 4px;
        font-weight: normal;
    }

    .wring-product .product {
        font-weight: normal;
        color: #333;
    }

    /* ============================= */
    /* ROW 2: ORDER + QTY */
    /* ============================= */
    .order-cell,

    .qty-cell {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin-right: 14px;
        margin-bottom: 10px;
        

    }

    .order-cell input[type="checkbox"] {
        transform: scale(1.2);
    }

    .qty-cell input.qty {
        width: 45px;
        text-align: center;
    }

    .qty-cell .unit {
        font-size: 12px;
        color: #555;
    }

    /* ============================= */
    /* ROW 3: REMAIN */
    /* ============================= */
    .remain-cell {
        font-size: 12px;
        color: #666;
        margin-top: 10px;
    }
 

    /* Mobile labels visible */
    .mobile-label {
        display: inline;
        font-weight: 600;
        font-size: 12px;
        margin-right: 10px;
        color: #444;
	margin-top: 6px;

    }

    /* Search stacked */
    .mcd-search-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .mcd-search-filter input,
    .mcd-search-filter select {
        width: 100%;
    }

    /* Reset button full width */
    #mcd-reset-order {
        width: 100%;
        margin-top: 6px;
    }
}
/* Common button style */
#mcd-generate-pdf,
#mcd-generate-jpg,
#mcd-send-pdf {
    background-color: #007cba; /* primary blue */
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin: 5px 6px 5px 0;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

/* Hover effect */
#mcd-generate-pdf:hover,
#mcd-generate-jpg:hover,
#mcd-send-pdf:hover {
    background-color: #005f8d;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Active click effect */
#mcd-generate-pdf:active,
#mcd-generate-jpg:active,
#mcd-send-pdf:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Optional: different colors per button */
#mcd-generate-pdf {
    background-color: #dc3232; /* red for PDF */
}

#mcd-generate-jpg {
    background-color: #46b450; /* green for JPG */
}

#mcd-send-pdf {
    background-color: #2271b1; /* blue for email */
}

/* Disabled state */
#mcd-generate-pdf:disabled,
#mcd-generate-jpg:disabled,
#mcd-send-pdf:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
}

