/**
 * Frontend Styles
 * File: assets/css/style.css
 */

/* Tracking Container */
.crt-tracking-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.crt-tracking-header {
    text-align: center;
    margin-bottom: 30px;
}

.crt-tracking-header h2 {
    color: #0066cc;
    margin-bottom: 10px;
}

.crt-tracking-header p {
    color: #666;
}

/* Tracking Form */
.crt-tracking-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.crt-tracking-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.crt-tracking-input:focus {
    outline: none;
    border-color: #0066cc;
}

.crt-track-button {
    padding: 12px 30px;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.crt-track-button:hover {
    background-color: #0052a3;
}

.crt-track-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Results */
.crt-tracking-result {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Error */
.crt-tracking-error {
    padding: 15px;
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    border-radius: 4px;
    color: #c62828;
    margin-top: 20px;
}

/* ============================= */
/* ✅ NEW STATUS PROGRESS DESIGN */
/* ============================= */

.crt-status-progress {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 40px 0;
    gap: 20px;
}

.crt-status-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.crt-status-step::after {
    content: '';
    position: absolute;
    top: 22px;
    right: -50%;
    width: 100%;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.crt-status-step:last-child::after {
    display: none;
}

.crt-status-step.completed::after {
    background: #28a745;
}

.crt-status-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

.crt-status-step.completed .crt-status-icon {
    background: #28a745;
    color: #fff;
}

.crt-status-step.completed .crt-status-icon::before {
    content: '✓';
}

.crt-status-step.current .crt-status-icon {
    background: #0066cc;
    color: #fff;
}

.crt-status-step.current .crt-status-icon::before {
    content: '•';
    font-size: 28px;
}

.crt-status-label {
    font-size: 13px;
    color: #666;
    line-height: 1.3;
}

.crt-status-step.current .crt-status-label {
    color: #0066cc;
    font-weight: 600;
}

/* Cancelled */
.crt-status-cancelled {
    padding: 30px;
    text-align: center;
    background-color: #ffebee;
    border-radius: 8px;
    margin: 20px 0;
}

.crt-status-cancelled h3 {
    color: #c62828;
}

/* Order Details */
.crt-order-details {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
}

.crt-order-details h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.crt-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.crt-detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.crt-detail-item.crt-detail-full {
    grid-column: 1 / -1;
}

.crt-detail-label {
    font-weight: 600;
    color: #666;
    font-size: 13px;
    text-transform: uppercase;
}

.crt-detail-value {
    color: #333;
    font-size: 15px;
}

/* ============================= */
/* ⚠️ STATUS HISTORY — UNCHANGED */
/* ============================= */

.crt-status-history {
    margin: 30px 0;
}

.crt-status-history h3 {
    color: #333;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.crt-history-timeline {
    position: relative;
    padding-left: 40px;
}

.crt-history-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e0e0e0;
}

.crt-history-item {
    position: relative;
    margin-bottom: 25px;
}

.crt-history-dot {
    position: absolute;
    left: -34px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #0066cc;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #0066cc;
}

.crt-history-content {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
}

.crt-history-status {
    font-weight: 600;
    color: #0066cc;
    margin-bottom: 5px;
}

.crt-history-date {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.crt-history-notes {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    color: #555;
}

/* ============================= */
/* 📱 RESPONSIVE FIXES */
/* ============================= */

@media (max-width: 768px) {
    .crt-tracking-container {
        padding: 20px;
        margin: 20px auto;
    }

    .crt-tracking-form {
        flex-direction: column;
    }

    .crt-status-progress {
        flex-direction: column;
        align-items: flex-start;
    }

    .crt-status-step {
        display: flex;
        align-items: center;
        gap: 15px;
        text-align: left;
    }

    .crt-status-step::after {
        display: none;
    }

    .crt-status-label {
        font-size: 14px;
    }

    .crt-detail-grid {
        grid-template-columns: 1fr;
    }
}
