/* ================================================
   MY ORDERS TABLE - USER DASHBOARD CSS
   ================================================ */

/* Main Container */
.my-orders-container {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

/* Table Wrapper */
.orders-table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

/* Orders History Table */
.orders-history-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Table Head */
.orders-table-head {
    background: linear-gradient(135deg, #cf1539 0%, #76222f 100%);
    color: #fff;
}

.orders-header-row {
    border-bottom: 2px solid #ff3a6b;
}

.orders-header-row th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Table Body */
.orders-table-body {
    background: #fff;
}

.orders-data-row {
    border-bottom: 1px solid #e8e8e8;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.orders-data-row:hover {
    background-color: #f9f9f9;
    box-shadow: inset 0 0 10px rgba(102, 126, 234, 0.05);
}

.orders-data-row:last-child {
    border-bottom: none;
}

/* Table Data Cells */
.orders-history-table td {
    padding: 14px 12px;
    font-size: 13px;
    color: #333;
    vertical-align: middle;
}

/* Column Widths - Responsive */
.orders-col-product {
    min-width: 180px;
}

.orders-col-quantity {
    min-width: 80px;
    text-align: center;
}

.orders-col-price {
    min-width: 100px;
    text-align: center;
}

.orders-col-date {
    min-width: 120px;
    text-align: center;
}

.orders-col-orderid {
    min-width: 120px;
    text-align: center;
}

.orders-col-action {
    min-width: 140px;
    text-align: center;
}

/* Product Name Styling */
.order-product-name {
    display: inline-block;
    font-weight: 500;
    color: #333;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-product-name:hover {
    color: #cf1539;
    text-decoration: underline;
}

/* Quantity Styling */
.order-quantity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    padding: 4px 8px;
    background: #e8f0fe;
    border-radius: 4px;
    color: #cf1539;
    font-weight: 600;
}

/* Price Styling */
.order-price {
    display: inline-block;
    font-weight: 600;
    color: #27ae60;
    font-size: 14px;
}

/* Date Styling */
.order-date {
    display: inline-block;
    color: #666;
    font-size: 12px;
}

/* Order ID Styling */
.order-id {
    display: inline-block;
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 3px;
    color: #555;
    font-size: 11px;
    font-weight: 500;
}

/* Return Applied Badge */
.order-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.return-applied {
    background: #ffeaa7;
    color: #d97706;
    border: 1px solid #fbc34d;
}

/* Return Order Button */
.btn-order-return {
    display: inline-block;
    padding: 7px 14px;
    background: linear-gradient(135deg, #cf1539 0%, #76222f 100%);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-order-return:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(223, 18, 96, 0.4);
    color: #fff;
    text-decoration: none;
}

.btn-order-return:active {
    transform: translateY(0);
}

/* No Orders Message */
.no-orders-message {
    text-align: center;
    padding: 50px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.no-orders-message p {
    margin: 0;
    color: #999;
    font-size: 16px;
    font-weight: 500;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

/* Tablet View */
@media (max-width: 768px) {
    .orders-header-row th {
        padding: 12px 8px;
        font-size: 11px;
    }

    .orders-history-table td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .orders-col-product {
        min-width: 140px;
    }

    .order-product-name {
        max-width: 130px;
    }
}

/* Mobile View */
@media (max-width: 480px) {
    .orders-table-wrapper {
        margin-top: 15px;
    }

    .orders-header-row th {
        padding: 10px 6px;
        font-size: 10px;
    }

    .orders-history-table td {
        padding: 8px 6px;
        font-size: 11px;
    }

    .orders-col-product {
        min-width: 100px;
    }

    .orders-col-quantity,
    .orders-col-price,
    .orders-col-date,
    .orders-col-orderid {
        min-width: 70px;
    }

    .orders-col-action {
        min-width: 100px;
    }

    .order-product-name {
        max-width: 90px;
    }

    .btn-order-return {
        padding: 5px 10px;
        font-size: 10px;
    }

    /* Stack header and data columns on very small screens */
}

/* Small Mobile - Horizontal Scroll Only */
@media (max-width: 380px) {
    .orders-col-product {
        min-width: 120px;
    }

    .orders-col-quantity,
    .orders-col-price,
    .orders-col-date,
    .orders-col-orderid {
        min-width: 75px;
    }

    .orders-col-action {
        min-width: 110px;
    }
}

/* ================================================
   ACCESSIBILITY
   ================================================ */

.orders-history-table tbody tr:focus-within {
    outline: 2px solid #667eea;
    outline-offset: -2px;
}

.btn-order-return:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .orders-history-table {
        background: #2a2a2a;
    }

    .orders-table-body {
        background: #2a2a2a;
    }

    .orders-data-row {
        border-bottom-color: #444;
    }

    .orders-data-row:hover {
        background-color: #333;
    }

    .orders-history-table td {
        color: #e0e0e0;
    }

    .order-product-name {
        color: #e0e0e0;
    }

    .order-product-name:hover {
        color: #667eea;
    }

    .order-id {
        background: #444;
        color: #ccc;
    }

    .order-date {
        color: #aaa;
    }

    .no-orders-message {
        background: #333;
        border-color: #555;
    }

    .no-orders-message p {
        color: #888;
    }
}
