/* Tracking Page Styles */
:root {
    --tracking-gradient-start: #fffbeb;
    --tracking-gradient-end: #fef3c7;
    --tracking-gold: #eba747;
    --tracking-gold-dark: #d4922f;
    --tracking-success: #10b981;
    --tracking-success-dark: #059669;
}

/* Hero Section */
.tracking-hero {
    background: linear-gradient(135deg, var(--tracking-gradient-start) 0%, var(--tracking-gradient-end) 100%);
    padding: 60px 0;
    text-align: center;
}

.tracking-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1b1b18;
    margin-bottom: 10px;
}

.tracking-hero p {
    color: #706f6c;
    font-size: 1.1rem;
}

/* Tracking Section */
.tracking-section {
    padding: 60px 0;
    max-width: 700px;
    margin: 0 auto;
}

/* Form Card */
.tracking-form-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 40px;
    margin-bottom: 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tracking-form-card:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

.tracking-form-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1b1b18;
    margin-bottom: 8px;
}

.tracking-form-card>p {
    color: #706f6c;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #1b1b18;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e4e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
    font-family: 'Lexend', sans-serif;
}

.form-group input:focus {
    outline: none;
    border-color: var(--tracking-gold);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(235, 167, 71, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #999;
}

/* Track Button */
.track-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--tracking-gold) 0%, var(--tracking-gold-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Lexend', sans-serif;
}

.track-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(235, 167, 71, 0.35);
}

.track-btn:active {
    transform: translateY(-1px);
}

.track-btn svg {
    width: 20px;
    height: 20px;
}

/* Order Result */
.order-result {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.order-result-header {
    background: linear-gradient(135deg, var(--tracking-gold) 0%, var(--tracking-gold-dark) 100%);
    color: #fff;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-result-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.order-result-header .order-id {
    font-size: 0.9rem;
    opacity: 0.9;
}

.tracking-source-pill {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 12px;
    font-weight: 600;
}

.order-result-header .order-total {
    text-align: right;
}

.order-total-label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.order-total-amount {
    font-size: 1.3rem;
    font-weight: 700;
}

.order-result-body {
    padding: 30px;
}

.tracking-notice {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 14px;
}

/* Status Timeline */
.status-timeline {
    display: flex;
    justify-content: space-between;
    margin-bottom: 35px;
    position: relative;
    padding: 0 10px;
}

.status-timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: #e5e4e0;
    z-index: 0;
}

.status-timeline::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--tracking-success), var(--tracking-success));
    z-index: 1;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-timeline.status-pending::after {
    width: 0%;
}

.status-timeline.status-confirmed::after {
    width: 25%;
}

.status-timeline.status-processing::after {
    width: 50%;
}

.status-timeline.status-shipped::after {
    width: 75%;
}

.status-timeline.status-delivered::after {
    width: calc(100% - 80px);
}

/* Status Steps */
.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.status-step .step-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #e5e4e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.status-step .step-icon svg {
    width: 20px;
    height: 20px;
    stroke: #999;
    transition: stroke 0.3s ease;
}

.status-step.active .step-icon,
.status-step.completed .step-icon {
    background: linear-gradient(135deg, var(--tracking-success) 0%, var(--tracking-success-dark) 100%);
    animation: iconPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes iconPop {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.status-step.active .step-icon svg,
.status-step.completed .step-icon svg {
    stroke: #fff;
}

.status-step .step-label {
    font-size: 12px;
    color: #999;
    font-weight: 500;
    text-align: center;
}

.status-step.active .step-label,
.status-step.completed .step-label {
    color: var(--tracking-success);
    font-weight: 600;
}

/* Order Details */
.order-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.detail-item {
    background: #f8f8f6;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: #f0efeb;
    transform: translateY(-2px);
}

.detail-item label {
    display: block;
    font-size: 12px;
    color: #706f6c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-item span {
    font-size: 15px;
    font-weight: 600;
    color: #1b1b18;
}

.status-text-success {
    color: var(--tracking-success);
}

.status-text-warning {
    color: #b45309;
}

.status-text-info {
    color: #2563eb;
}

.status-text-danger {
    color: #dc2626;
}

.tracking-events {
    border-top: 1px solid #f0efeb;
    border-bottom: 1px solid #f0efeb;
    padding: 22px 0;
    margin: 0 0 25px 0;
}

.tracking-events h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1b1b18;
    margin-bottom: 14px;
}

.tracking-event {
    background: #fafaf8;
    border: 1px solid #ecebe6;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.tracking-event:last-child {
    margin-bottom: 0;
}

.tracking-event-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #1b1b18;
}

.tracking-event-head strong {
    font-size: 14px;
}

.tracking-event-head span {
    color: #706f6c;
    white-space: nowrap;
}

.tracking-event-location {
    margin-top: 6px;
    color: #4b5563;
    font-size: 13px;
}

.tracking-event-note {
    margin-top: 4px;
    color: #6b7280;
    font-size: 12px;
}

/* Order Items */
.order-items {
    border-top: 1px solid #f0efeb;
    padding-top: 25px;
}

.order-items h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1b1b18;
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f0efeb;
    transition: all 0.2s ease;
}

.order-item:hover {
    background: #fafaf8;
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 8px;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    background: #f8f8f6;
}

.item-image-placeholder {
    width: 50px;
    height: 50px;
    background: #f0efeb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-item-details {
    flex: 1;
}

.order-item-details h5 {
    font-size: 14px;
    font-weight: 600;
    color: #1b1b18;
    margin: 0 0 3px 0;
}

.order-item-details p {
    font-size: 13px;
    color: #706f6c;
    margin: 0;
}

.order-item-price {
    font-weight: 600;
    color: #1b1b18;
    font-size: 14px;
}

/* Error State */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.error-message svg {
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tracking-hero h1 {
        font-size: 2rem;
    }

    .tracking-section {
        padding: 40px 20px;
    }

    .tracking-form-card {
        padding: 25px;
    }

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

    .order-result-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .order-result-header .order-total {
        text-align: center;
    }

    .status-timeline {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }

    .status-timeline::before,
    .status-timeline::after {
        display: none;
    }

    .status-step {
        width: 30%;
    }
}
