
/* Frontend styles for order tracking and customer-facing elements */

.orderp-order-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.orderp-order-status-icon {
    font-size: 14px;
}

.orderp-status-timeline {
    margin: 20px 0;
}

.orderp-timeline-item {
    position: relative;
    padding: 15px 0 15px 40px;
    border-left: 2px solid #eee;
}

.orderp-timeline-item:last-child {
    border-left: none;
}

.orderp-timeline-icon {
    position: absolute;
    left: -10px;
    top: 15px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.orderp-timeline-item.completed .orderp-timeline-icon {
    background: #46b450;
    border-color: #46b450;
    color: #fff;
}

.orderp-timeline-content h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
}

.orderp-timeline-date {
    color: #666;
    font-size: 12px;
}

.orderp-timeline-note {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
}

/* Email notification styling */
.orderp-email-template {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.orderp-email-header {
    background: #0073aa;
    color: #fff;
    padding: 20px;
    text-align: center;
}

.orderp-email-content {
    padding: 20px;
}

.orderp-email-footer {
    background: #f9f9f9;
    padding: 15px;
    text-align: center;
    font-size: 12px;
    color: #666;
}

.orderp-order-details {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.orderp-order-details h3 {
    margin-top: 0;
}

.orderp-order-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.orderp-order-items li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.orderp-order-items li:last-child {
    border-bottom: none;
}

/* RTL Support for frontend */
[dir="rtl"] .orderp-timeline-item {
    padding: 15px 40px 15px 0;
    border-left: none;
    border-right: 2px solid #eee;
}

[dir="rtl"] .orderp-timeline-icon {
    left: auto;
    right: -10px;
}

[dir="rtl"] .orderp-order-status {
    flex-direction: row-reverse;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .orderp-timeline-item {
        padding-left: 30px;
    }
    
    [dir="rtl"] .orderp-timeline-item {
        padding-right: 30px;
        padding-left: 0;
    }
    
    .orderp-timeline-icon {
        width: 16px;
        height: 16px;
        left: -8px;
        font-size: 8px;
    }
    
    [dir="rtl"] .orderp-timeline-icon {
        right: -8px;
        left: auto;
    }
    
    .orderp-email-header,
    .orderp-email-content,
    .orderp-email-footer {
        padding: 15px;
    }
}

/* Dark mode support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    .orderp-timeline-item {
        border-left-color: #444;
    }
    
    .orderp-timeline-icon {
        background: #333;
        border-color: #444;
    }
    
    .orderp-order-details {
        background: #333;
        color: #fff;
    }
    
    .orderp-email-footer {
        background: #333;
        color: #ccc;
    }
}

/* Print styles for order pages */
@media print {
    .orderp-timeline-item {
        break-inside: avoid;
    }
    
    .orderp-order-status {
        border: 1px solid #000 !important;
        background: transparent !important;
        color: #000 !important;
    }
}

/* Accessibility improvements */
.orderp-order-status:focus,
.orderp-timeline-item:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .orderp-order-status {
        border: 2px solid;
    }
    
    .orderp-timeline-icon {
        border-width: 3px;
    }
}

/* Animation for status changes */
.orderp-status-change {
    animation: orderp-highlight 2s ease-in-out;
}

@keyframes orderp-highlight {
    0% { background-color: transparent; }
    50% { background-color: #fff3cd; }
    100% { background-color: transparent; }
}