/* Modern WooCommerce Dashboard Styles - Chauffeur System Integration */

/* Reset and Base */
.modern-wc-dashboard * {
    box-sizing: border-box;
}

.modern-wc-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    color: #333333;
    background: transparent;
    padding: 0;
    margin: 0;
}

/* Dashboard Header - Chauffeur Style */
.modern-dashboard-header {
    background: #343a40;
    color: #ffffff;
    padding: 40px 30px;
    margin-bottom: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.modern-dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.modern-dashboard-header .header-content {
    position: relative;
    z-index: 2;
}

.modern-dashboard-header h1 {
    margin: 0 0 12px 0;
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.user-info {
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    color: #ffffff;
}

.member-since {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dashboard Statistics - Chauffeur Style */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #ffffff;
    padding: 24px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #007bff;
    transition: width 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.stat-card:hover::before {
    width: 6px;
}

.stat-icon {
    font-size: 28px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dashboard Sections - Chauffeur Style */
.dashboard-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f8f9fa;
}

.section-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #212529;
}

.view-all-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 14px;
    border: 1px solid transparent;
}

.view-all-link:hover {
    background: #e7f3ff;
    color: #0056b3;
    text-decoration: none;
    border-color: #b3d7ff;
}

/* Order Cards - Chauffeur Style */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.order-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.order-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.order-card:hover::before {
    transform: scaleX(1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.order-number {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-number strong {
    font-size: 18px;
    color: #212529;
    font-weight: 600;
}

.order-date {
    font-size: 14px;
    color: #6c757d;
}

.order-content {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    margin-bottom: 20px;
}

.order-items p {
    margin: 0;
    color: #495057;
    line-height: 1.5;
    font-size: 15px;
}

.order-total {
    text-align: right;
}

.total-label {
    font-size: 13px;
    color: #6c757d;
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.total-amount {
    font-size: 20px;
    font-weight: 700;
    color: #212529;
}

.order-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Status Badges - Chauffeur Style */
.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-processing {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #74c0fc;
}

.status-completed {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #a3cfbb;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
}

.status-on-hold {
    background: #e2e3e5;
    color: #41464b;
    border: 1px solid #c6c8ca;
}

.status-refunded {
    background: #e7e3ff;
    color: #4c1d95;
    border: 1px solid #c4b5fd;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f1aeb5;
}

.status-default {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

/* Buttons - Chauffeur Style */
.button {
    display: inline-block;
    padding: 10px 20px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    border: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.4;
}

.button:hover {
    background: #e9ecef;
    color: #212529;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.button-primary {
    background: #007bff;
    color: #ffffff;
    border-color: #007bff;
}

.button-primary:hover {
    background: #0056b3;
    color: #ffffff;
    border-color: #0056b3;
}

.button.cancel {
    background: #dc3545;
    color: #ffffff;
    border-color: #dc3545;
}

.button.cancel:hover {
    background: #c82333;
    color: #ffffff;
    border-color: #c82333;
}

/* Quick Actions - Chauffeur Style */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.quick-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #007bff;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.quick-action:hover {
    background: #ffffff;
    color: #212529;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.quick-action:hover::before {
    transform: scaleY(1);
}

.quick-action-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quick-action-content h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #212529;
}

.quick-action-content p {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.4;
}

/* Empty State - Chauffeur Style */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6c757d;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #495057;
}

.empty-state p {
    margin: 0 0 24px 0;
    font-size: 16px;
    line-height: 1.5;
}

/* Orders Pagination - Chauffeur Style */
.orders-pagination {
    margin-top: 32px;
    text-align: center;
}

.orders-pagination .page-numbers {
    display: inline-block;
    padding: 10px 14px;
    margin: 0 4px;
    color: #495057;
    text-decoration: none;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.orders-pagination .page-numbers:hover,
.orders-pagination .page-numbers.current {
    background: #007bff;
    color: #ffffff;
    border-color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* WooCommerce Integration */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    margin: 0;
    border-bottom: 1px solid #f8f9fa;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li:last-child {
    border-bottom: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 16px 20px;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    pointer-events: auto !important;
    position: relative;
    z-index: 100;
    border-left: 4px solid transparent;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background: #f8f9fa;
    color: #007bff;
    border-left-color: #007bff;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    background: #007bff;
    color: #ffffff;
    border-left-color: #ffffff;
}

/* Ensure dashboard navigation is always functional */
.modern-wc-dashboard .woocommerce-MyAccount-navigation a,
.modern-wc-dashboard [href*="my-account"],
.woocommerce-MyAccount-content a {
    pointer-events: auto !important;
    text-decoration: none;
}

/* Fix for account page navigation */
.woocommerce-MyAccount-navigation {
    pointer-events: auto !important;
    position: relative;
    z-index: 100;
}

.woocommerce-MyAccount-navigation * {
    pointer-events: auto !important;
}

/* Ensure all dashboard links work */
.modern-wc-dashboard a {
    pointer-events: auto !important;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    .modern-dashboard-header {
        padding: 30px 20px;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .modern-dashboard-header h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .user-info {
        flex-direction: column;
        gap: 8px;
        font-size: 14px;
    }
    
    .member-since {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    /* Better mobile stats layout: 3x2 grid */
    .dashboard-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .stat-card {
        padding: 16px 12px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
        min-height: 100px;
    }
    
    .stat-icon {
        font-size: 20px;
        width: 40px;
        height: 40px;
    }
    
    .stat-value {
        font-size: 18px;
        margin-bottom: 2px;
    }
    
    .stat-label {
        font-size: 10px;
        letter-spacing: 0.3px;
    }
    
    .dashboard-section {
        padding: 20px 16px;
        margin-bottom: 16px;
        border-radius: 8px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .section-header h2 {
        font-size: 20px;
    }
    
    .order-card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .order-content {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 16px;
    }
    
    .order-total {
        text-align: left;
    }
    
    .order-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .order-actions .button {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .quick-action {
        padding: 16px;
    }
    
    .quick-action-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .quick-action-content h3 {
        font-size: 15px;
    }
    
    .quick-action-content p {
        font-size: 13px;
    }
    
    .orders-pagination .page-numbers {
        padding: 8px 12px;
        margin: 0 2px;
        font-size: 14px;
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    .modern-dashboard-header {
        padding: 24px 16px;
    }
    
    .modern-dashboard-header h1 {
        font-size: 22px;
    }
    
    .dashboard-stats {
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px 8px;
        min-height: 90px;
    }
    
    .stat-icon {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 9px;
    }
    
    .dashboard-section {
        padding: 16px 12px;
    }
    
    .section-header h2 {
        font-size: 18px;
    }
    
    .order-card {
        padding: 12px;
    }
    
    .order-number strong {
        font-size: 16px;
    }
    
    .total-amount {
        font-size: 18px;
    }
}

/* Landscape phones optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .dashboard-stats {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: 1fr;
    }
    
    .stat-card {
        min-height: 80px;
    }
    
    .modern-dashboard-header {
        padding: 20px 16px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .stat-card,
    .dashboard-section,
    .order-card,
    .quick-action {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
