/* Rohini Threads - Order Tracking Page Styles */

/* ============================================
   Page Layout
   ============================================ */
.track-page {
    padding-top: 130px;
    min-height: 100vh;
    background: var(--light-color);
    transition: padding-top 0.3s ease;
}

body.scrolled .track-page {
    padding-top: 90px;
}

.track-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px 20px;
}

.track-page .page-title {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 30px;
    text-align: center;
}

/* ============================================
   Search Section
   ============================================ */
.track-search-section {
    margin-bottom: 30px;
}

.track-search-box {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.track-search-box label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 12px;
}

.track-search-form {
    display: flex;
    gap: 12px;
}

.track-search-form input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.track-search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15);
}

.track-search-form input::placeholder {
    letter-spacing: 1px;
    text-transform: none;
    color: #999;
}

.track-search-form .btn {
    padding: 14px 28px;
    white-space: nowrap;
}

.track-hint {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #888;
}

/* ============================================
   Loading State
   ============================================ */
.track-loading {
    background: white;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

.track-loading .loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
}

.track-loading p {
    color: #666;
}

/* ============================================
   Error State
   ============================================ */
.track-error {
    background: white;
    border-radius: 12px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--shadow);
}

.track-error-icon {
    font-size: 3.5rem;
    color: #FF6B6B;
    margin-bottom: 15px;
}

.track-error h3 {
    font-size: 1.4rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.track-error p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* ============================================
   Result Section
   ============================================ */
.track-result {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Cancelled Banner */
.cancelled-banner {
    background: #fff3cd;
    color: #856404;
    padding: 12px 20px;
    text-align: center;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cancelled-banner span {
    font-size: 1.2rem;
}

/* Order Header */
.track-order-header {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 25px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.track-order-info {
    text-align: center;
}

.track-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.track-id {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.track-order-info span:not(.track-label) {
    font-size: 0.95rem;
    color: var(--dark-color);
}

/* ============================================
   Timeline Section
   ============================================ */
.track-timeline-section {
    padding: 25px;
    border-bottom: 1px solid #eee;
}

.track-timeline-section h3 {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 25px;
}

.track-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
}

/* Timeline connector line */
.track-timeline::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 30px;
    right: 30px;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.timeline-marker {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #999;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.timeline-content {
    text-align: center;
}

.timeline-label {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

/* Completed state */
.timeline-item.completed .timeline-marker {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.timeline-item.completed .timeline-label {
    color: var(--dark-color);
}

/* Current state */
.timeline-item.current .timeline-marker {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 6px rgba(245, 166, 35, 0.2);
}

.timeline-item.current .timeline-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Cancelled state */
.timeline-item.cancelled .timeline-marker {
    background: #FF6B6B;
    border-color: #FF6B6B;
    color: white;
}

.timeline-item.cancelled .timeline-label {
    color: #FF6B6B;
    font-weight: 600;
}

/* ============================================
   Items Section
   ============================================ */
.track-items-section {
    padding: 25px;
    border-bottom: 1px solid #eee;
}

.track-items-section h3 {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.track-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.track-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
}

.track-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.track-item-name {
    font-weight: 500;
    color: var(--dark-color);
}

.track-item-variant {
    font-size: 0.85rem;
    color: #888;
}

.track-item-qty {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* ============================================
   Actions Section
   ============================================ */
.track-actions {
    padding: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.track-actions .btn {
    min-width: 160px;
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 768px) {
    .track-page .page-title {
        font-size: 1.6rem;
    }

    .track-search-form {
        flex-direction: column;
    }

    .track-search-form .btn {
        width: 100%;
    }

    .track-order-header {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .track-order-info {
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .track-label {
        margin-bottom: 0;
    }

    .track-timeline {
        flex-direction: column;
        gap: 0;
    }

    .track-timeline::before {
        top: 18px;
        left: 18px;
        right: auto;
        bottom: 18px;
        width: 3px;
        height: auto;
    }

    .timeline-item {
        flex-direction: row;
        align-items: center;
        gap: 15px;
        padding: 10px 0;
    }

    .timeline-marker {
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .timeline-content {
        text-align: left;
    }

    .track-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .track-actions {
        flex-direction: column;
    }

    .track-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .track-container {
        padding: 20px 15px;
    }

    .track-search-box {
        padding: 20px;
    }

    .track-search-form input {
        font-size: 1rem;
        padding: 12px 14px;
    }
}
