/* Shipping Tracker Frontend Styles */
.shipping-tracker-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tracker-header {
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--st-primary-start, #667eea) 0%, var(--st-primary-end, #764ba2) 100%);
    padding: 40px 20px;
    border-radius: 15px;
    color: white;
}

.tracker-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tracker-description {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

/* Search Form Styles */
.search-form-container {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    text-align: center;
}

.shipping-tracker-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

#tracking-number-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1.1em;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#tracking-number-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.track-button {
    background: linear-gradient(135deg, var(--st-button-start, #667eea) 0%, var(--st-button-end, #764ba2) 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 180px;
}

.track-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.track-button:active {
    transform: translateY(0);
}

.track-button .button-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.track-button .button-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Results Container */
.tracking-results-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.results-header {
    background: linear-gradient(135deg, var(--st-primary-start, #667eea) 0%, var(--st-primary-end, #764ba2) 100%);
    color: white;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.company-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.8em;
    font-weight: 700;
}

.tracking-number {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1em;
}

.current-status {
    text-align: center;
}

.status-indicator {
    padding: 15px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.2em;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Status Colors */
.status-pending { background: #ffc107; color: #212529; }
.status-processing { background: #17a2b8; }
.status-shipped { background: #007bff; }
.status-in-transit { background: #6f42c1; }
.status-out-for-delivery { background: #fd7e14; }
.status-delivered { background: #28a745; }
.status-cancelled { background: #dc3545; }
.status-returned { background: #6c757d; }

/* Details Grid */
.order-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 30px;
}

.detail-item {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--st-accent, #667eea);
    transition: transform 0.2s ease;
}

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

.detail-icon {
    font-size: 2em;
    margin-left: 15px;
    width: 50px;
    text-align: center;
}

.detail-content {
    flex: 1;
}

.detail-content label {
    display: block;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-content span {
    color: #333;
    font-size: 1.1em;
    font-weight: 500;
}

/* Timeline Styles */
.tracking-timeline {
    background: #f8f9fa;
    padding: 30px;
    margin: 0;
    border-top: 1px solid #e9ecef;
}

.tracking-timeline h4 {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 1.5em;
    font-weight: 600;
}

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--st-accent, #667eea);
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-left: 4px solid var(--st-accent, #667eea);
}

.timeline-item.current {
    border-left-color: #28a745;
    background: #f8fff8;
}

.timeline-marker {
    position: absolute;
    left: -33px;
    top: 25px;
    width: 40px;
    height: 40px;
    background: var(--st-accent, #667eea);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.timeline-item.current .timeline-marker {
    background: #28a745;
}

.marker-icon {
    font-size: 1.2em;
    color: white;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.timeline-header h5 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
    font-weight: 600;
}

.timeline-header time {
    color: #666;
    font-size: 0.9em;
    background: #e9ecef;
    padding: 5px 12px;
    border-radius: 15px;
}

.timeline-body {
    color: #555;
}

.timeline-location {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.95em;
}

.timeline-location strong {
    color: var(--st-accent, #667eea);
}

/* Notes Section */
.order-notes-section {
    background: var(--st-notes-bg, #fff3cd);
    padding: 25px 30px;
    margin: 0;
    border-top: 1px solid #e9ecef;
}

.order-notes-section h4 {
    margin: 0 0 15px 0;
    color: #856404;
    font-size: 1.2em;
}

.notes-content {
    color: #856404;
    line-height: 1.6;
}

/* Contact Info */
.contact-info {
    background: white;
    padding: 30px;
    border-top: 1px solid #e9ecef;
}

.contact-info h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.3em;
}

.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.2s ease;
}

.contact-item:hover {
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 1.5em;
    margin-left: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .shipping-tracker-container {
        padding: 15px;
    }

    .tracker-header {
        padding: 30px 15px;
    }

    .tracker-header h2 {
        font-size: 2em;
    }

    .search-form-container {
        padding: 25px 20px;
    }

    .results-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .order-details-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-marker {
        left: -23px;
        width: 30px;
        height: 30px;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

/* Error and Success Messages */
.message {
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Print Styles */
@media print {
    .search-form-container,
    .track-button,
    .contact-info {
        display: none;
    }

    .shipping-tracker-container {
        box-shadow: none;
        background: white;
    }

    .tracking-results-container {
        box-shadow: none;
    }
}
