/* ================================================= */
/* G. Orders Tab (orders) V2 Styling                 */
/* ================================================= */



/* 1. Orders Page Header (Main "Orders" Title and Total Count) */
.v2-page-header {
    display: flex;
    justify-content: space-between; /*Aligns title left, count right*/
    align-items: center;
    margin-bottom: 25px; /*Spacing before the first card*/
    margin-top: 50px;
}

/* .v2-page-header h2 {
    Large font size for the main page title "Orders"
    font-size: 2.5em; 
    font-weight: 700;
    color: #000;
    margin: 0;
} */

/* Cart Icon and Total Count Alignment (Top Right) */
.v2-total-orders-count {
    font-size: 1em;
    color: #928e8f !important;
    display: flex;
    align-items: center;
    font-weight: 400 !important;
    font-family: lato;
}

.v2-total-orders-count i {
    color: #e68a00; /* Orange Cart Icon */
    margin-right: 5px;
}
.v2-card-title {
    border-radius: 6px;
    background-color: #deb06a26;
    padding: 10px;
}
/* 2. Order History Card (Wrapper for the table) */
.v2-order-history-card {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    margin-bottom: 30px; /* Space before metric cards */
}

/* Order History Card Title - MUST be smaller than main page title */
.v2-order-history-card.v2-card-title {
    font-size: 0.5em; /* Smaller font size to match V0/Image 2 */
    font-weight: 600;
    color: #333;
    margin-top: 0;
    margin-bottom: 0; /* Table starts immediately after the title */
    padding-bottom: 15px; /* Padding below the title */
}

/* 3. V2 Table Styling */
.v2-orders-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    font-size: 0.95em;
    border: none!important; /* Ensure no external table border */
}

/* Remove all cell borders by default, will add back horizontal ones */
.v2-orders-table th, 
.v2-orders-table td {
    padding: 15px 10px;
    text-align: left;
    border: none; /* Removed all vertical and horizontal borders */
    border-bottom: 1px solid #eee; /* <-- REVISION: Added only horizontal border */
    vertical-align: middle;
}

.v2-orders-table thead th {
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #eee; /* Light bottom border for header */
    text-transform: capitalize;
    padding:0px !important;
}

.v2-orders-table tbody tr:last-child td {
    border-bottom: none; /* Remove border from the last row */
}

/* Order Number Link Styling */
.v2-order-number-cell a {
    color: #000; /* Orange link color */
    font-weight: 600;
    text-decoration: none;
}

/* 4. Status Badge Styling (Matches Image 2) */
.v2-order-status-cell {
    white-space: nowrap; 
}

.v2-status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: capitalize;
    text-align: center;
}

/* Status Colors based on V2 (Image 2) */
.v2-status-badge.status-completed {
    background-color: #ffc107; 
    color: #000; 
}

.v2-status-badge.status-processing {
    background-color: #333; 
    color: #fff; 
}

.v2-status-badge.status-cancelled,
.v2-status-badge.status-failed,
.v2-status-badge.status-pending {
    background-color: #f3ecee; 
    color: #666; 
}

/* 5. Metrics Card Grid at Bottom */
.v2-orders-metrics-grid {
    /* Uses the existing.v2-dashboard-metrics-grid layout from Dashboard CSS (Section B) */
    margin-top: 0; 
    margin-bottom: 0;
    padding: 0;
}

/* Style for Total Spent metric value (which contains currency symbol) */
.order-metric-value {
    font-size: 1.5em; 
}

.order-metric-label {
    font-size: 0.9em;
    color:#928e8f;
    font-weight: 500;
    font-family: 'Lato'; 
}

/* Responsive adjustment for Mobile */
@media (max-width: 768px) {
    .v2-orders-content-main{
        width: 100%;
    } 
 .v2-page-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 15px;
    }
 .v2-page-header h2 {
        font-size: 2em;
        margin-bottom: 10px;
    }
 .v2-orders-table thead {
        display: none;
    }
 .v2-orders-table, 
 .v2-orders-table tbody, 
 .v2-orders-table tr, 
 .v2-orders-table td {
        display: block;
        width: 100%;
    }
 .v2-orders-table tr {
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
    }
 .v2-orders-table td {
        border-bottom: none;
        text-align: right;
        padding-left: 50%;
        position: relative;
    }
 .v2-orders-table td::before {
        content: attr(data-title);
        position: absolute;
        left: 10px;
        width: 45%;
        text-align: left;
        font-weight: 600;
        color: #333;
    }
 .v2-orders-metrics-grid {
        padding: 0 5px;
    }
}