/* ============================================================
   Orders Module — Layout & Toolbar
============================================================ */
.androlab-orders-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Toolbar */
.androlab-orders-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    background: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.androlab-orders-toolbar .filters-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.androlab-orders-toolbar input,
.androlab-orders-toolbar select {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.androlab-orders-toolbar input:focus,
.androlab-orders-toolbar select:focus {
    border-color: #F05323;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
    outline: none;
}

.androlab-orders-toolbar .androlab-btn.small {
    font-size: 13px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s ease;
}

.androlab-orders-toolbar button:hover {
    background: #F05323;
    color: #fff;
}

/* ======================================
   Search Input (SaaS-Style)
====================================== */
#orders-search {
    flex: 1;
    min-width: 350px;
    max-width: 400px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 35px 8px 35px; /* space for icon */
    font-size: 14px;
    color: #111827;
    background: #f9fafb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-4.35-4.35M10 18a8 8 0 100-16 8 8 0 000 16z'/%3E%3C/svg%3E") no-repeat 10px center;
    background-size: 18px;
    transition: all 0.2s ease;
}

#orders-search:focus {
    background-color: #fff;
    border-color: #F05323;
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

#orders-search::placeholder {
    color: #9ca3af;
}

/* Optional Clear Button on the right (visual only) */
#orders-search::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%239ca3af' viewBox='0 0 24 24'%3E%3Cpath d='M6 18L18 6M6 6l12 12'/%3E%3C/svg%3E") no-repeat center;
    cursor: pointer;
}


/* ============================================================
   Orders Table
============================================================ */
.androlab-orders-table-container {
    background: #fff;
    border-radius: 8px;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
    overflow-x: auto;
}

.androlab-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: auto;
}

.androlab-table th,
.androlab-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.androlab-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 10;
}

.androlab-table tr:hover {
    background: #f3f4f6;
}

.loading,
.no-orders,
.error {
    text-align: center;
    color: #666;
    padding: 20px 0;
}

/* ============================================================
   Pagination
============================================================ */
.orders-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.orders-pagination button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#orders-page-label {
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

/* ============================================================
   Buttons
============================================================ */
.androlab-btn.small i {
    margin-right: 4px;
}

.order-note i {
    color: #fff;
}

.androlab-btn.light {
    background: #f9fafb;
    color: #333;
}

.androlab-btn.light:hover {
    background: #F05323;
    color: #fff;
}

/* ============================================================
   Order Note Modal (Task Style)
============================================================ */
#order-note-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

#order-note-modal .modal-content {
    background: #fff;
    border-radius: 10px;
    padding: 25px;
    width: 420px;
    max-width: 90%;
    margin: 10% auto;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: "Inter", sans-serif;
}

#order-note-modal .modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    color: #888;
    font-size: 20px;
}

#order-note-modal h3 {
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333;
}

.androlab-task-form input[type="text"],
.androlab-task-form input[type="date"],
.androlab-task-form textarea,
.androlab-task-form select {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 14px;
    margin-bottom: 10px;
    background: #fff;
    transition: border-color 0.2s ease;
}

.androlab-task-form input:focus,
.androlab-task-form textarea:focus,
.androlab-task-form select:focus {
    border-color: #F05323;
    outline: none;
}

.androlab-task-form textarea {
    resize: vertical;
    min-height: 70px;
}

.androlab-task-form button.androlab-btn.full {
    width: 100%;
    background: #F05323;
    color: #fff;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    padding: 10px 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.androlab-task-form button.androlab-btn.full:hover {
    background: #F05323;
}

/* ============================================================
   Products Column
============================================================ */
/* .order-products-cell {
    max-width: 350px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    position: relative;
    color: #333;
} */
 .order-products-cell {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 250px; /* optional but recommended */
    display: block;   /* ensures clean wrapping inside table cell */
}


/* Tooltip for full list */
/* .order-products-cell:hover::after {
    content: attr(title);
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 100;
    background: #111;
    color: #fff;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    max-width: 400px;
    white-space: normal;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
} */

/* ============================================================
   Responsive Layout
============================================================ */
@media (max-width: 1024px) {
    .androlab-orders-toolbar .filters-section {
        flex-direction: column;
        align-items: stretch;
    }

    .androlab-orders-toolbar input,
    .androlab-orders-toolbar select,
    .androlab-orders-toolbar button {
        width: 100%;
    }

    .androlab-orders-table-container {
        padding: 10px;
    }

    .order-products-cell {
        max-width: 200px;
    }
}
