/**
 * Estilos Modernos Frontend - Expresso Total Express
 * 
 * @package ExpressoTotalExpress
 * @version 4.0
 */

/* =======================================================================
   CALCULADORA DE FRETE MODERNA
======================================================================= */
.expresso-freight-calculator.modern {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin: 12px 0;
    overflow: hidden;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    transition: all 0.3s ease;
}

/* Trigger compacto (estado colapsado) */
.freight-calculator-trigger {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    background: #f8f9fa;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.freight-calculator-trigger:hover {
    background: #e9ecef;
    border-bottom-color: #dee2e6;
}

.calculator-compact-icon {
    font-size: 16px;
    margin-right: 8px;
    opacity: 0.7;
}

.calculator-compact-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.calculator-expand-icon {
    font-size: 12px;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.expresso-freight-calculator.expanded .calculator-expand-icon {
    transform: rotate(180deg);
}

/* Conteúdo expandido */
.freight-calculator-content {
    background: white;
    border-top: 1px solid #e2e8f0;
}

.expresso-freight-calculator.expanded {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-color: #2c3e50;
}

.expresso-freight-calculator.expanded .freight-calculator-trigger {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.expresso-freight-calculator.expanded .calculator-compact-text {
    color: white;
}

.expresso-freight-calculator.expanded .calculator-expand-icon {
    color: rgba(255, 255, 255, 0.8);
}

.freight-calculator-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 16px 20px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.calculator-icon {
    font-size: 24px;
    line-height: 1;
}

.calculator-title h4 {
    color: #1e293b !important;
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
}

.calculator-subtitle {
    color: #64748b !important;
    margin: 0;
    font-size: 13px;
}

/* Cores específicas para estado expandido */
.expresso-freight-calculator.expanded .calculator-title h4 {
    color: white;
}

.expresso-freight-calculator.expanded .calculator-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.freight-calculator-form {
    background: white;
    padding: 20px;
}

.freight-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.input-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8fafc;
    box-sizing: border-box;
    height: 48px;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #34495e;
    background: white;
}

.input-wrapper input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.input-wrapper .floating-label {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #64748b;
    font-size: 14px;
    transition: all 0.3s ease;
    pointer-events: none;
    background: transparent;
}

.input-wrapper input:focus + .floating-label,
.input-wrapper input:not(:placeholder-shown) + .floating-label {
    top: -8px;
    left: 8px;
    font-size: 11px;
    color: #34495e;
    background: white;
    padding: 0 4px;
}

.input-icon {
    position: absolute;
    right: 12px;
    top: 12px;
    font-size: 16px;
    color: #64748b;
}

.freight-calculate-btn {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    box-sizing: border-box;
}

.freight-calculate-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

.freight-calculate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.freight-error-inline {
    margin-top: 12px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dc2626;
    font-size: 14px;
}

.freight-results {
    margin-top: 24px;
}

.results-header h5 {
    margin: 0 0 16px 0;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
}

.freight-option-modern {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.freight-option-modern:hover {
    background: white;
    border-color: #34495e;
}

.method-info {
    flex: 1;
}

.method-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.method-delivery {
    font-size: 13px;
    color: #64748b;
}

.method-price {
    font-size: 18px;
    font-weight: 700;
    color: #059669;
    margin-right: 12px;
}

.method-icon {
    font-size: 20px;
    opacity: 0.7;
}

.freight-loading {
    text-align: center;
    padding: 24px;
}

.loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #6b7280;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* =======================================================================
   RASTREAMENTO NÃO ENCONTRADO
======================================================================= */
.tracking-not-found {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    margin: 16px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.not-found-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.not-found-content h4 {
    color: #495057;
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.not-found-content p {
    color: #6c757d;
    margin: 0 0 20px 0;
    font-size: 14px;
    line-height: 1.5;
}

.tracking-alternatives {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin: 16px 0;
}

.alt-option {
    margin-bottom: 16px;
}

.alt-option p {
    margin: 0 0 12px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
}

.tracking-redirect {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white !important;
    text-decoration: none !important;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.tracking-redirect:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    color: white !important;
    text-decoration: none !important;
}

.alt-help {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.alt-help p {
    margin: 0;
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

.alt-help strong {
    color: #495057;
    font-weight: 600;
}

/* =======================================================================
   RASTREAMENTO MODERNO
======================================================================= */
.expresso-tracking-widget.modern {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 8px;
    padding: 0;
    margin: 16px 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.tracking-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 24px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.tracking-icon {
    font-size: 32px;
    line-height: 1;
}

.tracking-title h4 {
    color: white;
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 600;
}

.tracking-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 13px;
}

.tracking-form {
    background: white;
    padding: 24px;
}

.tracking-input-group {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.tracking-search-btn {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tracking-search-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

.tracking-error-inline {
    margin-top: 12px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dc2626;
    font-size: 14px;
}

.tracking-results {
    background: white;
    margin-top: 24px;
    border-radius: 0 0 16px 16px;
}

.tracking-status-card {
    padding: 24px;
}

.tracking-status-header {
    margin-bottom: 24px;
}

.status-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending { 
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}
.status-transit { 
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}
.status-delivered { 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}
.status-cancelled { 
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.tracking-code-display {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
}

.estimated-delivery-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    border-left: 4px solid #0ea5e9;
}

.delivery-icon {
    font-size: 24px;
}

.delivery-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.delivery-date {
    font-weight: 600;
    color: #0f172a;
}

.tracking-timeline-modern {
    margin-top: 24px;
}

.timeline-title {
    margin: 0 0 20px 0;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
}

.timeline-container {
    position: relative;
}

.timeline-container:before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}

.timeline-event-modern {
    position: relative;
    padding-left: 48px;
    margin-bottom: 24px;
}

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

.event-marker {
    position: absolute;
    left: 8px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #e2e8f0;
}

.timeline-event-modern.active .event-marker {
    background: #10b981;
    box-shadow: 0 0 0 2px #10b981, 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.event-content {
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.timeline-event-modern.active .event-content {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.event-date {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 500;
}

.event-description {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.event-location {
    font-size: 13px;
    color: #64748b;
}

/* =======================================================================
   RESPONSIVIDADE
======================================================================= */
@media (max-width: 768px) {
    .freight-input-group,
    .tracking-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .input-wrapper {
        min-width: 100%;
    }
    
    .freight-calculate-btn,
    .tracking-search-btn {
        width: 100%;
        margin-top: 8px;
    }
    
    .freight-option-modern {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .method-price {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .status-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .estimated-delivery-card {
        flex-direction: column;
        text-align: center;
    }
    
    .freight-calculator-header,
    .tracking-header {
        padding: 16px 20px 12px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .freight-calculator-trigger {
        padding: 14px 16px;
    }
    
    .calculator-compact-text {
        font-size: 13px;
    }
    
    .calculator-icon,
    .tracking-icon {
        font-size: 28px;
    }
}

/* =======================================================================
   MELHORIAS DE ACESSIBILIDADE
======================================================================= */
.freight-calculate-btn:focus,
.tracking-search-btn:focus {
    outline: 2px solid #6b7280;
    outline-offset: 2px;
}

.input-wrapper input:focus {
    outline: none;
}

.freight-error-inline,
.tracking-error-inline {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =======================================================================
   LOADING STATES APRIMORADOS
======================================================================= */
.freight-loading,
.tracking-loading {
    background: rgba(255, 255, 255, 0.95);
    position: relative;
    z-index: 10;
}

.loading-animation p {
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

/* =======================================================================
   NOVA INTERFACE DE RASTREAMENTO MODERNA
======================================================================= */

/* Container principal da resposta de rastreamento */
.tracking-success-modern {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Card principal com informações do status */
.tracking-main-card {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    color: white;
    padding: 24px;
}

.main-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.tracking-code-display {
    flex: 1;
}

.code-label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.code-value {
    display: block;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 18px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.current-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.status-icon {
    font-size: 16px;
}

/* Status específicos com cores */
.current-status-badge.status-delivered {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.current-status-badge.status-out-for-delivery {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.current-status-badge.status-problem {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
    animation: urgentPulse 2s infinite;
}

.current-status-badge.status-in-transit {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

.current-status-badge.status-collected {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    border-color: rgba(107, 114, 128, 0.3);
}

.current-status-badge.status-on-route {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-color: rgba(249, 115, 22, 0.3);
}

/* Alertas de status especiais */
.status-alert {
    margin-top: 16px;
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid;
    animation: slideInAlert 0.5s ease-out;
}

.status-alert.alert-success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-left-color: #22c55e;
    color: #166534;
}

.status-alert.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left-color: #f59e0b;
    color: #92400e;
}

.status-alert.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left-color: #ef4444;
    color: #991b1b;
    animation: dangerPulse 3s infinite;
}

.alert-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-text {
    flex: 1;
}

.alert-text strong {
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.alert-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

/* Grid de informações */
.tracking-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-icon {
    font-size: 20px;
    opacity: 0.9;
}

.info-content {
    flex: 1;
}

.info-label {
    display: block;
    font-size: 11px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.info-value {
    display: block;
    font-weight: 600;
    font-size: 14px;
}

/* Timeline moderna */
.tracking-timeline-modern {
    padding: 24px;
    background: #fafbfc;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.timeline-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-icon {
    font-size: 20px;
}

.timeline-count {
    background: #6b7280;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.timeline-container {
    position: relative;
    padding-left: 34px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #6b7280, #e2e8f0);
    border-radius: 1px;
}

.timeline-event {
    position: relative;
    margin-bottom: 8px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.timeline-event.latest {
    border-color: #6b7280;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.15);
}

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

.timeline-connector {
    position: absolute;
    left: -30px;
    top: 24px;
    bottom: -32px;
    width: 3px;
    background: #e2e8f0;
    border-radius: 2px;
}

.timeline-connector.completed {
    background: #10b981;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.timeline-marker.delivered {
    border-color: #10b981;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    animation: successPulse 2s infinite;
}

.timeline-marker.out-for-delivery {
    border-color: #f59e0b;
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
    animation: warningPulse 2s infinite;
}

.timeline-marker.problem {
    border-color: #ef4444;
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3);
    animation: dangerPulse 1.5s infinite;
}

.timeline-marker.on-route {
    border-color: #f97316;
    background: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.2);
}

.timeline-marker.in-transit {
    border-color: #3b82f6;
    background: #3b82f6;
}

.timeline-marker.collected {
    border-color: #6b7280;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timeline-marker.collected .marker-icon {
    color: #6b7280;
}

.timeline-marker.created {
    border-color: #6b7280;
    background: #6b7280;
}

.timeline-marker.processed {
    border-color: #10b981;
    background: #10b981;
}

.timeline-marker.shipping {
    border-color: #f97316;
    background: #f97316;
}

.timeline-marker.warehouse {
    border-color: #8b5131;
    background: #8b5131;
}

.marker-icon {
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.timeline-content {
    padding: 8px 12px;
}

.event-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.event-title {
    font-weight: 500;
    color: #1e293b;
    font-size: 13px;
    line-height: 1.2;
    flex: 1;
    margin: 0;
}

.event-datetime {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    flex-shrink: 0;
}

.event-date {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}

.event-time {
    background: #e0e7ff;
    color: #4338ca;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}

.event-location {
    display: none;
}

.location-icon {
    font-size: 14px;
    color: #64748b;
}

.location-text {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

/* Footer */
.tracking-footer {
    padding: 16px 24px;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 12px;
}

.tracking-method,
.last-update {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
}

.method-icon,
.update-icon {
    font-size: 14px;
}

.method-text,
.update-text {
    font-weight: 500;
}

/* Responsividade para nova interface */
@media (max-width: 768px) {
    .main-card-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .tracking-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .timeline-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .timeline-container {
        padding-left: 40px;
    }
    
    .timeline-container::before {
        left: 16px;
    }
    
    .timeline-marker {
        left: -36px;
        width: 28px;
        height: 28px;
    }
    
    .timeline-connector {
        left: -26px;
    }
    
    .tracking-footer {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .event-datetime {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* Animações suaves */
.timeline-event {
    animation: fadeInUp 0.6s ease-out;
}

.timeline-event:nth-child(2) { animation-delay: 0.1s; }
.timeline-event:nth-child(3) { animation-delay: 0.2s; }
.timeline-event:nth-child(4) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-marker {
    transition: all 0.3s ease;
}

.timeline-event.latest .timeline-marker {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(107, 114, 128, 0.3);
    }
}

/* Animações de alerta especiais */
@keyframes slideInAlert {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.4);
    }
}

@keyframes warningPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.4);
    }
}

@keyframes dangerPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3);
    }
    50% {
        transform: scale(1.12);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.6);
    }
}

@keyframes urgentPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Compatibilidade com temas WordPress */
.expresso-freight-calculator.modern *,
.expresso-tracking-widget.modern *,
.tracking-success-modern * {
    box-sizing: border-box;
}