/**
 * Modern My Account Orders Page Styles
 * Inspired by order-received-modern.css
 * Glass morphism design with theme integration
 */

/* =============================================================================
   ORDERS PAGE LAYOUT OPTIMIZATION
   ============================================================================= */

/* Fix layout alignment - prevent content from starting on the right */
.woocommerce-account .woocommerce {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 0;
    align-items: flex-start;
}

.woocommerce-account .woocommerce-MyAccount-navigation {
    width: 100%;
    max-width: 280px;
    flex-shrink: 0;
}

.woocommerce-account .woocommerce-MyAccount-content {
    flex: 1;
    min-width: 300px;
    max-width: calc(100% - 310px);
}

/* =============================================================================
   MODERN ORDERS TABLE DESIGN
   ============================================================================= */

.woocommerce-orders-table__header,
.woocommerce-orders-table {
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(20px);
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 30px;
}

.woocommerce-orders-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

/* Table Header Styling */
.woocommerce-orders-table__header,
.woocommerce-orders-table thead {
    background: rgba(12, 224, 107, 0.1) !important;
}

.woocommerce-orders-table__header th,
.woocommerce-orders-table th {
    background: transparent !important;
    padding: 20px 24px !important;
    font-weight: 600 !important;
    color: var(--primary-green) !important;
    text-transform: uppercase !important;
    font-size: 14px !important;
    letter-spacing: 0.5px !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Table Rows */
.woocommerce-orders-table__row,
.woocommerce-orders-table tbody tr {
    background: transparent !important;
    transition: all 0.3s ease;
    border: none !important;
}

.woocommerce-orders-table__row:hover,
.woocommerce-orders-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03) !important;
    transform: translateY(-1px);
}

/* Table Cells */
.woocommerce-orders-table__cell,
.woocommerce-orders-table td {
    padding: 20px 24px !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: var(--light-text) !important;
    font-size: 15px;
    vertical-align: middle;
}

/* Order Number Links */
.woocommerce-orders-table__cell-order-number a,
.woocommerce-orders-table .order-number a {
    font-weight: 700 !important;
    color: var(--primary-green) !important;
    text-decoration: none !important;
    padding: 6px 12px;
    background: rgba(12, 224, 107, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
}

.woocommerce-orders-table__cell-order-number a:hover,
.woocommerce-orders-table .order-number a:hover {
    background: rgba(12, 224, 107, 0.2) !important;
    transform: translateX(3px);
    box-shadow: 0 4px 15px rgba(12, 224, 107, 0.2);
}

/* Order Status Badges */
.woocommerce-orders-table__cell-order-status mark,
.order-status mark {
    background: none !important;
    color: inherit !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border: 1px solid;
    display: inline-block;
}

/* Status Colors */
.status-completed,
mark.status-completed {
    color: var(--primary-green) !important;
    background: rgba(12, 224, 107, 0.1) !important;
    border-color: rgba(12, 224, 107, 0.3) !important;
}

.status-processing,
mark.status-processing {
    color: #3498db !important;
    background: rgba(52, 152, 219, 0.1) !important;
    border-color: rgba(52, 152, 219, 0.3) !important;
}

.status-on-hold,
mark.status-on-hold {
    color: #f39c12 !important;
    background: rgba(243, 156, 18, 0.1) !important;
    border-color: rgba(243, 156, 18, 0.3) !important;
}

.status-cancelled,
mark.status-cancelled {
    color: #e74c3c !important;
    background: rgba(231, 76, 60, 0.1) !important;
    border-color: rgba(231, 76, 60, 0.3) !important;
}

.status-pending,
mark.status-pending {
    color: #9b59b6 !important;
    background: rgba(155, 89, 182, 0.1) !important;
    border-color: rgba(155, 89, 182, 0.3) !important;
}

/* Order Total Styling */
.woocommerce-orders-table__cell-order-total,
.order-total {
    font-weight: 700 !important;
    color: var(--primary-green) !important;
    font-size: 16px !important;
}

/* Order Date */
.woocommerce-orders-table__cell-order-date,
.order-date {
    font-size: 14px !important;
    opacity: 0.8;
}

/* Action Buttons */
.woocommerce-orders-table__cell-order-actions .button,
.order-actions .button {
    background: var(--primary-green) !important;
    color: #000000 !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    transition: all 0.3s ease !important;
    margin: 2px !important;
    text-decoration: none !important;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(12, 224, 107, 0.2);
}

.woocommerce-orders-table__cell-order-actions .button:hover,
.order-actions .button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(12, 224, 107, 0.4) !important;
    background: rgba(12, 224, 107, 0.9) !important;
}

/* =============================================================================
   EMPTY ORDERS STATE
   ============================================================================= */

.woocommerce-message,
.woocommerce-info {
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(20px);
    border-radius: 20px !important;
    border: 1px solid rgba(12, 224, 107, 0.2) !important;
    padding: 0 !important;
    margin: 30px 0 !important;
    box-shadow: 0 8px 25px rgba(12, 224, 107, 0.1);
    position: relative;
    overflow: hidden;
    color: var(--light-text) !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-green);
}

.no-orders-content {
    text-align: center;
    padding: 50px 40px;
}

.no-orders-icon {
    font-size: 64px;
    margin-bottom: 25px;
    display: block;
    color: var(--primary-green);
}

.no-orders-content h3 {
    color: var(--primary-green) !important;
    font-size: 28px !important;
    margin-bottom: 15px !important;
    font-weight: 600 !important;
}

.no-orders-content p {
    font-size: 16px !important;
    margin-bottom: 30px !important;
    opacity: 0.8;
    line-height: 1.6;
}

.no-orders-content .button {
    background: var(--primary-green) !important;
    color: #000000 !important;
    padding: 15px 30px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    font-size: 16px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 6px 20px rgba(12, 224, 107, 0.3) !important;
    border: none !important;
}

.no-orders-content .button:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 30px rgba(12, 224, 107, 0.4) !important;
}

/* =============================================================================
   DASHBOARD WELCOME MESSAGE FIX
   ============================================================================= */

/* Fix spacing issues in welcome message */
.woocommerce-MyAccount-content p:first-of-type {
    background: linear-gradient(135deg, rgba(12, 224, 107, 0.1) 0%, rgba(12, 224, 107, 0.05) 100%) !important;
    border: 1px solid rgba(12, 224, 107, 0.2) !important;
    border-radius: 16px !important;
    padding: 25px 30px !important;
    margin-bottom: 30px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: var(--primary-green) !important;
    box-shadow: 0 4px 15px rgba(12, 224, 107, 0.1) !important;
    position: relative;
    overflow: hidden;
    line-height: 1.6 !important;
    letter-spacing: 0.3px !important;
}

/* Fix text spacing - prevent words running together */
.woocommerce-MyAccount-content p:first-of-type strong {
    margin-right: 8px !important;
    display: inline-block;
}

.woocommerce-MyAccount-content p:first-of-type::before {
    content: "👋";
    font-size: 24px;
    margin-right: 12px;
    vertical-align: middle;
}

.woocommerce-MyAccount-content p:first-of-type::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-green);
    border-radius: 0 0 0 16px;
}

/* =============================================================================
   ORDERS PAGE HEADER
   ============================================================================= */

.woocommerce-MyAccount-content h2,
.woocommerce-orders-title {
    color: var(--primary-green) !important;
    font-size: 28px !important;
    font-weight: 600 !important;
    margin-bottom: 25px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid rgba(12, 224, 107, 0.2) !important;
    position: relative;
}

.woocommerce-MyAccount-content h2::before,
.woocommerce-orders-title::before {
    content: "📋";
    font-size: 24px;
    margin-right: 12px;
    vertical-align: middle;
}

/* =============================================================================
   MOBILE RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 768px) {
    .woocommerce-account .woocommerce {
        flex-direction: column;
        gap: 20px;
    }
    
    .woocommerce-account .woocommerce-MyAccount-navigation {
        width: 100%;
        max-width: none;
    }
    
    .woocommerce-account .woocommerce-MyAccount-content {
        max-width: 100%;
    }
    
    .woocommerce-orders-table__header th,
    .woocommerce-orders-table th,
    .woocommerce-orders-table__cell,
    .woocommerce-orders-table td {
        padding: 12px 16px !important;
        font-size: 14px !important;
    }
    
    .woocommerce-orders-table__cell-order-number a,
    .woocommerce-orders-table .order-number a {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .woocommerce-orders-table__cell-order-actions .button,
    .order-actions .button {
        padding: 6px 12px !important;
        font-size: 11px !important;
        margin: 1px !important;
    }
    
    .no-orders-content {
        padding: 30px 20px;
    }
    
    .no-orders-content h3 {
        font-size: 24px !important;
    }
    
    .no-orders-icon {
        font-size: 48px;
    }
}

/* =============================================================================
   LIGHT THEME SUPPORT
   ============================================================================= */

body.light-theme .woocommerce-orders-table__header,
body.light-theme .woocommerce-orders-table {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-theme .woocommerce-orders-table__header,
body.light-theme .woocommerce-orders-table thead {
    background: rgba(4, 122, 58, 0.1) !important;
}

body.light-theme .woocommerce-orders-table__header th,
body.light-theme .woocommerce-orders-table th {
    color: var(--neon-green) !important;
}

body.light-theme .woocommerce-orders-table__cell,
body.light-theme .woocommerce-orders-table td {
    color: #1a1a1a !important;
    border-bottom-color: rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .woocommerce-orders-table__row:hover,
body.light-theme .woocommerce-orders-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.03) !important;
}

body.light-theme .woocommerce-orders-table__cell-order-number a,
body.light-theme .woocommerce-orders-table .order-number a {
    color: var(--neon-green) !important;
    background: rgba(4, 122, 58, 0.1);
}

body.light-theme .woocommerce-orders-table__cell-order-number a:hover,
body.light-theme .woocommerce-orders-table .order-number a:hover {
    background: rgba(4, 122, 58, 0.2) !important;
}

body.light-theme .woocommerce-orders-table__cell-order-total,
body.light-theme .order-total {
    color: var(--neon-green) !important;
}

body.light-theme .woocommerce-orders-table__cell-order-actions .button,
body.light-theme .order-actions .button {
    background: var(--neon-green) !important;
    color: #ffffff !important;
}

body.light-theme .woocommerce-message,
body.light-theme .woocommerce-info {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(4, 122, 58, 0.2) !important;
    color: #1a1a1a !important;
}

body.light-theme .woocommerce-message::before,
body.light-theme .woocommerce-info::before {
    background: var(--neon-green);
}

body.light-theme .no-orders-icon {
    color: var(--neon-green);
}

body.light-theme .no-orders-content h3 {
    color: var(--neon-green) !important;
}

body.light-theme .no-orders-content .button {
    background: var(--neon-green) !important;
    color: #ffffff !important;
}

body.light-theme .woocommerce-MyAccount-content p:first-of-type {
    background: linear-gradient(135deg, rgba(4, 122, 58, 0.1) 0%, rgba(4, 122, 58, 0.05) 100%) !important;
    border-color: rgba(4, 122, 58, 0.2) !important;
    color: var(--neon-green) !important;
}

body.light-theme .woocommerce-MyAccount-content p:first-of-type::after {
    background: var(--neon-green);
}

body.light-theme .woocommerce-MyAccount-content h2,
body.light-theme .woocommerce-orders-title {
    color: var(--neon-green) !important;
    border-bottom-color: rgba(4, 122, 58, 0.2) !important;
}

/* Status colors for light theme */
body.light-theme .status-completed,
body.light-theme mark.status-completed {
    color: var(--neon-green) !important;
    background: rgba(4, 122, 58, 0.1) !important;
    border-color: rgba(4, 122, 58, 0.3) !important;
}