/* Rastreamento Moderno - CSS Modular */
/* Variáveis já definidas no site principal */

/* Loading State */
.rastreamento-loading {
    text-align: center;
    padding: 4rem 2rem;
}

.rastreamento-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--amarelo-global, #FFB600);
    border-radius: 50%;
    animation: rastreamentoSpin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes rastreamentoSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Container de Resultados */
.rastreamento-results {
    animation: rastreamentoFadeIn 0.5s ease;
}

@keyframes rastreamentoFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Status Card */
.rastreamento-status {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.rastreamento-status-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.rastreamento-status-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.rastreamento-status-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
}

.rastreamento-status-icon.delivered {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.rastreamento-status-icon.in-transit {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.rastreamento-status-icon.out-for-delivery {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.rastreamento-status-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--azul-global, #0B193E);
}

.rastreamento-status-text p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

/* Info Card */
.rastreamento-info {
    text-align: right;
}

.rastreamento-codigo {
    display: inline-block;
    background: var(--amarelo-global, #FFB600);
    color: var(--azul-global, #0B193E);
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.rastreamento-meta {
    font-size: 0.875rem;
    color: #64748b;
}

/* Progress Bar */
.rastreamento-progress {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.rastreamento-progress-bar {
    position: relative;
    margin: 0 2rem;
}

.rastreamento-progress-bg {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    position: relative;
}

.rastreamento-progress-fill {
    height: 100%;
    background: #10b981;
    border-radius: 2px;
    transition: width 1s ease;
}

.rastreamento-progress-dots {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: -18px;
}

.rastreamento-progress-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.rastreamento-progress-dot.completed {
    background: #10b981;
    color: white;
}

.rastreamento-progress-dot.active {
    background: var(--amarelo-global, #FFB600);
    color: var(--azul-global, #0B193E);
    animation: rastreamentoPulse 2s infinite;
}

@keyframes rastreamentoPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 182, 0, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 182, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 182, 0, 0); }
}

.rastreamento-progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
}

.rastreamento-progress-label {
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    flex: 1;
}

/* Timeline Compacta */
.rastreamento-timeline {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.rastreamento-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.rastreamento-timeline-toggle {
    background: none;
    border: 1px solid #e2e8f0;
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rastreamento-timeline-toggle:hover {
    border-color: var(--amarelo-global, #FFB600);
    color: var(--azul-global, #0B193E);
}

.rastreamento-timeline-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.5rem;
    position: relative;
}

.rastreamento-timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 32px;
    bottom: 0;
    width: 1px;
    background: #e2e8f0;
}

.rastreamento-timeline-marker {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.875rem;
}

.rastreamento-timeline-marker.success {
    border-color: #10b981;
    color: #10b981;
}

.rastreamento-timeline-details {
    flex: 1;
}

.rastreamento-timeline-time {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.rastreamento-timeline-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--azul-global, #0B193E);
    margin-bottom: 0.25rem;
}

.rastreamento-timeline-location {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* Quick Actions */
.rastreamento-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.rastreamento-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.rastreamento-action-btn:hover {
    border-color: var(--amarelo-global, #FFB600);
    color: var(--azul-global, #0B193E);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Estados */
.rastreamento-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

.rastreamento-empty {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

/* Mobile */
@media (max-width: 768px) {
    .rastreamento-status-content {
        flex-direction: column;
        text-align: center;
    }
    
    .rastreamento-info {
        text-align: center;
    }
    
    .rastreamento-progress-labels {
        font-size: 0.65rem;
    }
    
    .rastreamento-actions {
        flex-direction: column;
    }
    
    .rastreamento-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Integração com Site Principal */
.section.rastreamento .rastreamento-container {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

/* Timeline oculta */
.rastreamento-timeline-hidden {
    display: none;
}