/* ============================================
   Order Track Page - Production Level
   Bogura Bazar Theme
   ============================================ */

/* ============================================
   Hero Section
   ============================================ */
.track-hero {
    padding: 40px 0 30px;
    background: linear-gradient(135deg, #f8fafc, #e8f5e9);
    border-bottom: 1px solid #e5e7eb;
}

.track-hero-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.track-hero-icon {
    width: 64px;
    height: 64px;
    background: rgba(1, 126, 61, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #017e3d;
}

.track-hero-text h1 {
    font-size: 28px;
    font-weight: 800;
    color: #1e1e2e;
    margin: 0;
}

.track-hero-text p {
    font-size: 15px;
    color: #6b7280;
    margin: 4px 0 0;
}

/* ============================================
   Track Section
   ============================================ */
.track-section {
    padding: 40px 0 60px;
    background: #f8fafc;
}

.track-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

/* --- Track Form --- */
.track-form {
    margin-bottom: 30px;
}

.track-input-group {
    display: flex;
    gap: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
}

.track-input-group:focus-within {
    border-color: #017e3d;
    box-shadow: 0 0 0 3px rgba(1, 126, 61, 0.08);
}

.track-input-group .form-control {
    flex: 1;
    padding: 14px 20px;
    border: none;
    font-size: 15px;
    outline: none;
    background: transparent;
    color: #1e1e2e;
}

.track-input-group .form-control::placeholder {
    color: #9ca3af;
}

.track-btn {
    padding: 14px 28px;
    background: #017e3d;
    color: #ffffff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.track-btn:hover {
    background: #00632f;
}

.track-btn i {
    font-size: 16px;
}

/* --- Placeholder --- */
.track-placeholder {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.track-placeholder i {
    font-size: 48px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.track-placeholder h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e1e2e;
    margin-bottom: 8px;
}

.track-placeholder p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* --- Track Result --- */
.track-result {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    animation: slideIn 0.4s ease;
}

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

.track-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 12px;
}

.track-order-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.track-order-label {
    font-size: 14px;
    color: #6b7280;
}

.track-order-number {
    font-size: 16px;
    font-weight: 700;
    color: #1e1e2e;
}

.track-order-status {
    display: flex;
    align-items: center;
}

.status-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.status-shipped {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-delivered {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-cancelled {
    background: #fef2f2;
    color: #991b1b;
}

.status-badge.status-returned {
    background: #fef2f2;
    color: #991b1b;
}

/* --- Order Details --- */
.track-order-details {
    display: flex;
    gap: 24px;
    padding: 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.track-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b5563;
}

.track-detail-item i {
    color: #017e3d;
    font-size: 16px;
}

/* --- Timeline --- */
.track-timeline {
    padding: 24px 24px 30px;
}

.timeline-item {
    display: flex;
    gap: 16px;
    position: relative;
    padding-bottom: 24px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 32px;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-item.active::before {
    background: #017e3d;
}

.timeline-dot {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #9ca3af;
    transition: all 0.3s ease;
    z-index: 1;
}

.timeline-item.active .timeline-dot {
    background: #017e3d;
    border-color: #017e3d;
    color: #ffffff;
}

.timeline-item.completed .timeline-dot {
    background: #017e3d;
    border-color: #017e3d;
    color: #ffffff;
}

.timeline-content {
    flex: 1;
}

.timeline-content h5 {
    font-size: 15px;
    font-weight: 600;
    color: #1e1e2e;
    margin: 0 0 2px 0;
}

.timeline-item:not(.active) .timeline-content h5 {
    color: #9ca3af;
}

.timeline-content p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.timeline-item.active .timeline-content p {
    color: #017e3d;
    font-weight: 500;
}

/* --- Track Error --- */
.track-error {
    text-align: center;
    padding: 40px 20px;
    background: #fef2f2;
    border-radius: 12px;
    border: 1px solid #fca5a5;
}

.track-error i {
    font-size: 48px;
    color: #ef4444;
    margin-bottom: 16px;
}

.track-error h3 {
    font-size: 20px;
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 8px;
}

.track-error p {
    font-size: 14px;
    color: #7f1d1d;
    margin: 0;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 991px) {
    .track-hero {
        padding: 30px 0 20px;
    }
}

@media (max-width: 767px) {
    .track-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .track-hero-text h1 {
        font-size: 24px;
    }

    .track-section {
        padding: 30px 0 40px;
    }

    .track-input-group {
        flex-direction: column;
        border-radius: 12px;
    }

    .track-input-group .form-control {
        padding: 14px 16px;
        border-bottom: 1px solid #e5e7eb;
    }

    .track-btn {
        justify-content: center;
        padding: 14px 20px;
    }

    .track-order-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 18px;
    }

    .track-order-details {
        flex-direction: column;
        gap: 8px;
        padding: 12px 18px;
    }

    .track-timeline {
        padding: 16px 18px 20px;
    }

    .timeline-item {
        gap: 12px;
        padding-bottom: 18px;
    }

    .timeline-item::before {
        left: 15px;
        top: 28px;
    }

    .timeline-dot {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 12px;
    }

    .timeline-content h5 {
        font-size: 14px;
    }

    .timeline-content p {
        font-size: 12px;
    }

    .track-placeholder {
        padding: 40px 16px;
    }

    .track-placeholder i {
        font-size: 36px;
    }

    .track-placeholder h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .track-hero {
        padding: 24px 0 16px;
    }

    .track-hero-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .track-hero-text h1 {
        font-size: 20px;
    }

    .track-hero-text p {
        font-size: 13px;
    }

    .track-section {
        padding: 20px 0 30px;
    }

    .track-input-group .form-control {
        font-size: 14px;
        padding: 12px 14px;
    }

    .track-btn {
        font-size: 14px;
        padding: 12px 16px;
    }

    .track-order-header {
        padding: 14px 14px;
    }

    .track-order-number {
        font-size: 14px;
    }

    .track-order-details {
        padding: 10px 14px;
    }

    .track-detail-item {
        font-size: 13px;
    }

    .track-timeline {
        padding: 12px 14px 16px;
    }

    .timeline-item {
        gap: 10px;
        padding-bottom: 14px;
    }

    .timeline-item::before {
        left: 12px;
        top: 24px;
    }

    .timeline-dot {
        width: 26px;
        height: 26px;
        min-width: 26px;
        font-size: 10px;
    }

    .timeline-content h5 {
        font-size: 13px;
    }

    .timeline-content p {
        font-size: 12px;
    }

    .track-placeholder {
        padding: 30px 14px;
    }

    .track-placeholder i {
        font-size: 28px;
    }

    .track-placeholder h3 {
        font-size: 16px;
    }

    .track-placeholder p {
        font-size: 13px;
    }

    .track-error {
        padding: 30px 14px;
    }

    .track-error i {
        font-size: 36px;
    }

    .track-error h3 {
        font-size: 17px;
    }
}

@media (max-width: 320px) {
    .track-hero-text h1 {
        font-size: 17px;
    }

    .track-hero-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .track-order-number {
        font-size: 13px;
    }

    .track-detail-item {
        font-size: 12px;
    }

    .timeline-dot {
        width: 22px;
        height: 22px;
        min-width: 22px;
        font-size: 9px;
    }

    .timeline-content h5 {
        font-size: 12px;
    }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .track-result {
        animation: none;
    }

    .track-input-group {
        transition: none;
    }

    .track-btn {
        transition: none;
    }

    .track-btn:hover {
        transform: none;
    }

    .timeline-dot {
        transition: none;
    }
}

.track-btn:focus-visible,
.track-input-group .form-control:focus-visible {
    outline: 3px solid #017e3d;
    outline-offset: 2px;
}
/* ============================================
   Status Badge Colors
   ============================================ */

.status-badge.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.status-confirmed {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.status-processing {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-shipped {
    background: #ede9fe;
    color: #5b21b6;
}

.status-badge.status-delivered {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.status-cancelled {
    background: #fef2f2;
    color: #991b1b;
}

.status-badge.status-returned {
    background: #fef2f2;
    color: #991b1b;
}

/* Timeline Item Cancelled */
.timeline-item.cancelled .timeline-dot {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

.timeline-item.cancelled .timeline-content h5 {
    color: #ef4444 !important;
}
