/**
 * J&T Express Frontend Tracking Styles
 */

/* Tracking Section on Order Page */
.woocommerce-jt-tracking {
    margin: 30px 0;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #eee;
}

.woocommerce-jt-tracking h2 {
    color: #e31837;
    margin: 0 0 15px 0;
    font-size: 20px;
}

.jt-tracking-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.jt-bill-code {
    font-weight: bold;
    color: #e31837;
    font-size: 18px;
}

/* Timeline */
.jt-tracking-timeline {
    position: relative;
    padding-left: 35px;
}

.jt-tracking-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: #ddd;
}

.jt-tracking-item {
    position: relative;
    padding-bottom: 25px;
}

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

.jt-tracking-dot {
    position: absolute;
    left: -29px;
    top: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ccc;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #ccc;
}

.jt-tracking-item.current .jt-tracking-dot {
    background: #e31837;
    box-shadow: 0 0 0 2px #e31837;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 2px #e31837;
    }
    50% {
        box-shadow: 0 0 0 5px rgba(227, 24, 55, 0.3);
    }
    100% {
        box-shadow: 0 0 0 2px #e31837;
    }
}

.jt-tracking-content {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.jt-tracking-item.current .jt-tracking-content {
    border-left: 3px solid #e31837;
}

.jt-tracking-time {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.jt-tracking-status {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.jt-tracking-item.current .jt-tracking-status {
    color: #e31837;
}

.jt-tracking-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.jt-tracking-location {
    color: #999;
    font-size: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #eee;
}

.jt-no-tracking {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 30px;
}

/* Tracking Form (Shortcode) */
.jt-tracking-form-wrapper {
    max-width: 600px;
    margin: 30px auto;
}

.jt-tracking-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.jt-form-group {
    flex: 1;
    min-width: 250px;
}

.jt-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.jt-form-group input {
    width: 100%;
    padding: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.jt-form-group input:focus {
    outline: none;
    border-color: #e31837;
}

.jt-track-btn {
    padding: 14px 35px;
    background: #e31837;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.jt-track-btn:hover {
    background: #c41530;
}

.jt-tracking-result {
    margin-top: 25px;
    padding: 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.jt-tracking-result .error {
    color: #dc3545;
    text-align: center;
}

/* Responsive */
@media (max-width: 600px) {
    .jt-tracking-form {
        flex-direction: column;
    }

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

    .jt-tracking-timeline {
        padding-left: 25px;
    }

    .jt-tracking-dot {
        left: -21px;
        width: 12px;
        height: 12px;
    }
}
