/* WooCommerce Orders Dashboard Styles */

.wc-custom-dashboard {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Login Message */
.wc-dashboard-login {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.wc-dashboard-login p {
    font-size: 18px;
    color: #555;
}

.wc-dashboard-login a {
    color: #5b4de8;
    font-weight: 600;
    text-decoration: none;
}

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h2 {
    margin: 0 0 20px 0;
    color: #1a1a1a;
    font-size: 32px;
    font-weight: 700;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    display: block;
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

/* Filters */
.dashboard-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

#searchOrders {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

#searchOrders:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#filterStatus {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    background: white;
    min-width: 180px;
}

/* Orders Container */
.orders-container {
    display: grid;
    gap: 20px;
}

.no-orders {
    text-align: center;
    padding: 80px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.no-orders p {
    font-size: 20px;
    color: #666;
    margin-bottom: 20px;
}

.btn-shop {
    display: inline-block;
    padding: 14px 30px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-shop:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Order Card */
.order-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.order-card:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #e0e0e0;
}

.order-info h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
    color: #1a1a1a;
}

.order-date {
    color: #666;
    font-size: 14px;
}

/* Status Badges */
.order-status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #cfe2ff;
    color: #084298;
}

.status-on-hold {
    background: #f8d7da;
    color: #842029;
}

.status-completed {
    background: #d1e7dd;
    color: #0f5132;
}

.status-cancelled {
    background: #e2e3e5;
    color: #41464b;
}

.status-refunded {
    background: #f1aeb5;
    color: #58151c;
}

.status-failed {
    background: #f8d7da;
    color: #842029;
}

/* Order Card Body */
.order-card-body {
    padding: 25px;
}

.order-items-preview strong {
    display: block;
    margin-bottom: 15px;
    color: #333;
    font-size: 15px;
}

.order-items-preview ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.order-items-preview li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
}

.order-items-preview li img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.order-items-preview li span {
    color: #555;
    font-size: 14px;
}

.more-items {
    background: #e9ecef !important;
    color: #666;
    font-weight: 600;
    font-style: italic;
    justify-content: center;
}

.order-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.meta-item {
    display: flex;
    justify-content: space-between;
}

.meta-label {
    color: #666;
    font-size: 14px;
}

.meta-value {
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.total-price {
    color: #667eea;
    font-size: 18px !important;
}

/* Order Card Footer */
.order-card-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.order-card-footer button,
.order-card-footer a {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-view-details {
    background: #667eea;
    color: white;
}

.btn-view-details:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-cancel-order {
    background: #dc3545;
    color: white;
}

.btn-cancel-order:hover {
    background: #bb2d3b;
}

.btn-download {
    background: #198754;
    color: white;
}

.btn-download:hover {
    background: #157347;
}

/* Order Details Modal */
.order-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    overflow-y: auto;
}

.order-modal .modal-content {
    background: white;
    margin: 50px auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.order-modal .close {
    position: absolute;
    right: 25px;
    top: 25px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    z-index: 1;
}

.order-modal .close:hover {
    color: #333;
}

.order-details-content {
    padding: 40px;
}

.order-details-content h2 {
    margin: 0 0 30px 0;
    color: #1a1a1a;
    font-size: 28px;
    padding-bottom: 20px;
    border-bottom: 3px solid #667eea;
}

.order-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.details-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
}

.details-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.details-table {
    width: 100%;
}

.details-table td {
    padding: 8px 0;
    font-size: 14px;
}

.details-table td:first-child {
    color: #666;
    width: 40%;
}

.details-section address {
    font-style: normal;
    line-height: 1.8;
    color: #555;
    font-size: 14px;
}

/* Order Items Table */
.order-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.order-items-table thead {
    background: #667eea;
    color: white;
}

.order-items-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.order-items-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.product-cell {
    display: flex;
    align-items: center;
    gap: 15px;
}

.product-cell img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.item-meta {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

/* Order Totals */
.order-totals {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 25px;
}

.order-totals table {
    width: 100%;
    max-width: 400px;
    margin-left: auto;
}

.order-totals td {
    padding: 10px 0;
    font-size: 15px;
}

.order-totals td:last-child {
    text-align: right;
}

.total-row {
    border-top: 2px solid #667eea;
    padding-top: 15px !important;
}

.total-row td {
    font-size: 20px !important;
    color: #667eea;
    padding-top: 15px !important;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-custom-dashboard {
        padding: 15px;
    }
    
    .dashboard-header h2 {
        font-size: 24px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .dashboard-filters {
        flex-direction: column;
    }
    
    #searchOrders,
    #filterStatus {
        width: 100%;
    }
    
    .order-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .order-meta {
        grid-template-columns: 1fr;
    }
    
    .order-card-footer {
        flex-direction: column;
    }
    
    .order-card-footer button,
    .order-card-footer a {
        width: 100%;
        text-align: center;
    }
    
    .order-details-content {
        padding: 20px;
    }
    
    .order-details-grid {
        grid-template-columns: 1fr;
    }
    
    .order-items-table {
        font-size: 12px;
    }
    
    .product-cell {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Hidden class for filtering */
.hidden {
    display: none !important;
}