/* Koombiyo Delivery Frontend Styles */

.koombiyo-tracking-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.koombiyo-tracking-form {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.tracking-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
    text-align: center;
}

.tracking-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 30px 0;
    text-align: center;
}

.track-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.track-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.track-input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.track-button {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #2271b1 0%, #1a5a8a 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.track-button:hover {
    background: linear-gradient(135deg, #1a5a8a 0%, #134a6f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.tracking-loader {
    text-align: center;
    padding: 40px 20px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tracking-error {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 15px 20px;
    color: #c00;
    margin-top: 20px;
}

.tracking-result {
    margin-top: 30px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.tracking-info-card {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 30px;
    border: 1px solid #e0e0e0;
}

.info-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.info-item .label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 600;
    text-transform: uppercase;
}

.info-item .value {
    display: block;
    font-size: 18px;
    color: #333;
    font-weight: 700;
}

.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    background: #ff9500;
    color: white;
}

/* 5-Step Timeline Styles */
.status-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0;
    position: relative;
}

.status-timeline::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 5%;
    right: 5%;
    height: 4px;
    background: #e0e0e0;
    z-index: 0;
}

.timeline-item {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.timeline-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    background: #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
}

.timeline-item.complete .timeline-icon {
    background: #4caf50;
}

.timeline-item.active .timeline-icon {
    background: #2271b1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.timeline-label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
    line-height: 1.4;
}

.timeline-item.complete .timeline-label,
.timeline-item.active .timeline-label {
    color: #333;
    font-weight: 700;
}

/* Truck emoji styling */
.truck-emoji {
    font-size: 16px;
    display: inline-block;
    margin-right: 4px;
}

.order-history {
    margin-top: 40px;
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.order-history h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #2271b1;
}

.history-timeline {
    position: relative;
    padding-left: 30px;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.history-item {
    position: relative;
    margin-bottom: 25px;
    padding-left: 20px;
}

.history-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: #2271b1;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #2271b1;
}

.history-time {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.history-status {
    font-size: 16px;
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
}

.history-note {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    font-size: 16px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .koombiyo-tracking-container {
        padding: 10px;
    }
    
    .koombiyo-tracking-form {
        padding: 20px 15px;
    }
    
    .tracking-title {
        font-size: 22px;
    }
    
    .info-header {
        grid-template-columns: 1fr;
    }
    
    /* Keep horizontal layout on mobile but make it more compact */
    .status-timeline {
        margin: 30px 0;
        padding: 0 5px;
    }
    
    .status-timeline::before {
        top: 20px;
        left: 6%;
        right: 6%;
        height: 3px;
    }
    
    .timeline-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin: 0 auto 8px;
    }
    
    .timeline-label {
        font-size: 10px;
        line-height: 1.3;
    }
    
    .truck-emoji {
        font-size: 12px;
        margin-right: 2px;
    }
    
    .order-history {
        padding: 15px;
    }
    
    .history-timeline {
        padding-left: 25px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .status-timeline {
        margin: 20px -5px;
    }
    
    .status-timeline::before {
        top: 18px;
        left: 8%;
        right: 8%;
    }
    
    .timeline-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        margin: 0 auto 6px;
    }
    
    .timeline-label {
        font-size: 9px;
        line-height: 1.2;
    }
    
    .truck-emoji {
        font-size: 11px;
        margin-right: 1px;
    }
}

/* Very small devices - ultra compact */
@media (max-width: 360px) {
    .status-timeline::before {
        left: 10%;
        right: 10%;
    }
    
    .timeline-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .timeline-label {
        font-size: 8px;
    }
    
    .truck-emoji {
        font-size: 10px;
    }
}