/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
body {
    background: linear-gradient(to bottom, #ffffff, #D3E4FD20);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}
.container {
    max-width: 768px;
    margin: 0 auto;
    padding: 2rem 1rem;
}
/* Estilo do header */
.header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fade-in 0.5s ease-out;
}
.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background-color: rgba(211, 228, 253, 0.3);
    color: #3b82f6;
    margin-bottom: 0.5rem;
}
.title {
    font-size: 1.875rem;
    font-weight: 300;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
}
/* Estilo do formulário */
.form-wrapper {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    animation: fade-in-up 0.5s ease-out;
    padding: 10px;
}
.form-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(109.6deg, rgba(223,234,247,1) 11.2%, rgba(244,248,252,1) 91.1%);
    opacity: 0.4;
    z-index: -1;
    transition: opacity 0.3s;
}
.form-wrapper:focus-within::before {
    opacity: 0.6;
}
.tracking-form {
    display: flex;
    gap: 0.5rem;
}
.tracking-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    transition: all 0.3s;
    font-size: 0.875rem;
}
.tracking-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(211, 228, 253, 0.7);
}
.tracking-button {
    background-color: #D3E4FD;
    color: #3b82f6;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
}
.tracking-button:hover {
    background-color: rgba(211, 228, 253, 0.8);
}
.tracking-button svg {
    width: 1rem;
    height: 1rem;
}
.help-text {
    text-align: center;
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.75rem;
    animation: fade-in 0.5s ease-out;
}
/* Estilo do resultado de rastreamento */
.result {
    margin-top: 3rem;
}
.tracking-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    animation: fade-in-up 0.5s ease-out;
}
.tracking-number {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.carrier {
    font-size: 0.875rem;
    color: #64748b;
}
.delivery-date-label {
    font-size: 0.875rem;
    color: #64748b;
    text-align: right;
}
.delivery-date {
    font-size: 1.125rem;
    font-weight: 500;
    text-align: right;
}
/* Estilo da linha do tempo */
.timeline {
    position: relative;
}
.timeline-event {
    position: relative;
    display: flex;
    gap: 1.5rem;
    padding-bottom: 2rem;
    animation: fade-in-up 0.5s ease-out;
    animation-fill-mode: both;
}
.timeline-event:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 0.75rem;
    top: 1.125rem;
    height: calc(100% - 1rem);
    width: 1px;
    background-color: #e2e8f0;
}
.timeline-dot {
    position: relative;
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
    border: 2px solid white;
    z-index: 10;
    flex-shrink: 0;
    margin-top: 0.25rem;
}
.timeline-dot-posted {
    background-color: #D3E4FD;
}
.timeline-dot-transit {
    background-color: #FEF7CD;
}
.timeline-dot-delivered {
    background-color: #F2FCE2;
    box-shadow: 0 0 0 4px rgba(211, 228, 253, 0.3);
}
.timeline-dot-exception {
    background-color: #FFDEE2;
}
.timeline-dot-pending {
    background-color: #FBD38D;
}
.timeline-dot-received {
    background-color: #E5DEFF;
}
.timeline-card {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    flex-grow: 1;
    min-width: 16rem;
    transition: all 0.3s;
}
.timeline-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}
.status-badge {
    font-size: 0.78rem;
    padding: 0.135rem 0.5rem;
    border-radius: 9999px;
    font-weight: 550;
    color: #3d4654;
}
.status-posted {
    background-color: #D3E4FD;
}
.status-transit {
    background-color: #FEF7CD;
}
.status-delivered {
    background-color: #F2FCE2;
}
.status-exception {
    background-color: #FFDEE2;
}
.status-pending {
    background-color: #FBD38D;
}
.status-received {
    background-color: #E5DEFF;
}
.timeline-time {
    font-size: 0.78rem;
    color: #64748b;
}
.timeline-description {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
.timeline-description-small {
    font-size: 0.805rem;
    font-weight: 300;
    margin-bottom: 0.25rem;
}
.timeline-location {
    font-size: 0.75rem;
    color: #64748b;
}
/* Exemplo de estados: vazio, carregando e erro */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}
.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.25rem solid #D3E4FD;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spinner 1s linear infinite;
    margin-bottom: 1rem;
}
.loading-text {
    color: #64748b;
    animation: pulse 2s infinite ease-in-out;
}
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    animation: fade-in 0.5s ease-out;
}
.error-icon {
    width: 3rem;
    height: 3rem;
    background-color: #FFDEE2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.error-icon svg {
    width: 2rem;
    height: 2rem;
    color: #ef4444;
}
.error-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.error-message {
    color: #64748b;
}
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    animation: fade-in 0.5s ease-out;
    color: #64748b;
}
.empty-icon {
    width: 3rem;
    height: 3rem;
    background-color: #D3E4FD;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.empty-icon svg {
    width: 2rem;
    height: 2rem;
    color: #3b82f6;
}
.empty-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
/* Animações */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}
/* Responsividade */
@media (max-width: 640px) {
    .tracking-info {
        flex-direction: column;
    }
    .delivery-date-label, .delivery-date {
        text-align: left;
        margin-top: 0.5rem;
    }
    .timeline-event {
        gap: 0.75rem;
    }
}
/* Múltiplos estados de demonstração (normalmente controlados com JavaScript) */
.timeline-events .timeline-event:nth-child(1) { animation-delay: 0.1s; }
.timeline-events .timeline-event:nth-child(2) { animation-delay: 0.2s; }
.timeline-events .timeline-event:nth-child(3) { animation-delay: 0.3s; }
.timeline-events .timeline-event:nth-child(4) { animation-delay: 0.4s; }
.timeline-events .timeline-event:nth-child(5) { animation-delay: 0.5s; }

/* Info box styles */
.info-box {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background-color: rgba(254, 247, 205, 0.2);
    border: 1px solid rgba(254, 247, 205, 0.3);
    animation: fade-in 0.5s ease-out;
}

.info-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    color: #d97706;
    margin-top: 0.125rem;
}

.info-text {
    font-size: 0.875rem;
    color: #64748b;
}

@layer utilities {
    @keyframes soft-pulse {
        0%, 100% {
            opacity: 1;
            box-shadow: 0 0 0 0 rgba(255, 222, 226, 0.8);
        }
        50% {
            opacity: 0.85;
            box-shadow: 0 0 0 8px rgba(255, 222, 226, 0);
        }
    }

    .animate-pulse-soft {
        animation: soft-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }
}