/* Advanced Order Status Plugin Styles */

/* Admin Styles */
.aos-admin-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.aos-orders-list {
    flex: 2;
}

.aos-quick-actions {
    flex: 1;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.aos-quick-actions h3 {
    margin-top: 0;
    color: #333;
}

.aos-quick-actions label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.aos-quick-actions input,
.aos-quick-actions select {
    width: 100%;
    padding: 8px 12px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.aos-quick-actions button {
    background: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    width: 100%;
    font-size: 14px;
    font-weight: bold;
    margin-top: 10px;
}

.aos-quick-actions button:hover {
    background: #005a87;
}

/* Order Status Colors */
.status-pending {
    color: #e79500;
    background: #fff8e1;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-processing {
    color: #1976d2;
    background: #e3f2fd;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-payment-received {
    color: #388e3c;
    background: #e8f5e8;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-product-packed {
    color: #7b1fa2;
    background: #f3e5f5;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-handed-courier {
    color: #f57c00;
    background: #fff3e0;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-delivery-assigned {
    color: #0288d1;
    background: #e1f5fe;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-out-delivery {
    color: #d32f2f;
    background: #ffebee;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-delivery-complete {
    color: #2e7d32;
    background: #e8f5e8;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-no-phone-response {
    color: #f57c00;
    background: #fff8e1;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-customer-cancelled {
    color: #d32f2f;
    background: #ffebee;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-completed {
    color: #2e7d32;
    background: #e8f5e8;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.status-cancelled {
    color: #d32f2f;
    background: #ffebee;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

/* Frontend Tracking Styles */
.aos-tracking-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.aos-tracking-container h3 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
}

.aos-tracking-form {
    margin-bottom: 30px;
}

.tracking-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .tracking-input-group {
        flex-direction: column;
    }
}

.tracking-input-group input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.tracking-input-group input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.tracking-input-group button {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-width: 120px;
}

.tracking-input-group button:hover {
    background: linear-gradient(135deg, #005a87, #004670);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.tracking-input-group button:active {
    transform: translateY(0);
}

.tracking-result {
    background: white;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.tracking-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.tracking-header h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
}

.order-info {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.order-info strong {
    color: #333;
}

.tracking-timeline {
    position: relative;
}

.timeline-item {
    display: flex;
    margin-bottom: 25px;
    position: relative;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(5px);
}

.timeline-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
    font-size: 14px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-icon.completed {
    background: linear-gradient(135deg, #46b450, #2e7d32);
    box-shadow: 0 3px 10px rgba(70, 180, 80, 0.3);
}

.timeline-icon.current {
    background: linear-gradient(135deg, #0073aa, #005a87);
    box-shadow: 0 3px 10px rgba(0, 115, 170, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 115, 170, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 115, 170, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 115, 170, 0); }
}

.timeline-icon.pending {
    background: #ccc;
    color: #999;
}

.timeline-content {
    flex: 1;
    padding-top: 8px;
}

.timeline-status {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    font-size: 16px;
}

.timeline-date {
    font-size: 13px;
    color: #666;
    background: #f8f8f8;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
}

.timeline-item:not(:last-child):after {
    content: '';
    position: absolute;
    left: 22px;
    top: 45px;
    width: 2px;
    height: calc(100% - 20px);
    background: linear-gradient(to bottom, #ddd, #f0f0f0);
    z-index: 1;
}

.timeline-item.completed:not(:last-child):after {
    background: linear-gradient(to bottom, #46b450, #2e7d32);
}

.tracking-error {
    background: #fff;
    border: 2px solid #dc3232;
    border-radius: 8px;
    padding: 20px;
    color: #dc3232;
    text-align: center;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.tracking-error p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Loading State */
.tracking-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.tracking-loading:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 600px) {
    .aos-tracking-container {
        margin: 10px;
        padding: 15px;
    }
    
    .timeline-icon {
        width: 35px;
        height: 35px;
        font-size: 12px;
        margin-right: 15px;
    }
    
    .timeline-item:not(:last-child):after {
        left: 17px;
        top: 35px;
    }
    
    .timeline-status {
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .aos-tracking-container {
        box-shadow: none;
        background: white;
    }
    
    .tracking-input-group {
        display: none;
    }
    
    .timeline-icon {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}