/**
 * Estilos para notificações SSE (Server-Sent Events)
 * Popup de notificação que aparece quando novas viagens são criadas
 */

.sse-notification-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    border-left: 4px solid #0d6efd;
}

/* Celebration variant */
.sse-notification-popup.celebration {
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
    animation: celebration-pulse 2s ease-in-out infinite;
}

@keyframes celebration-pulse {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(255, 193, 7, 0.3);
    }
    50% {
        box-shadow: 0 8px 40px rgba(255, 193, 7, 0.5);
    }
}

.sse-notification-popup.show {
    opacity: 1;
    transform: translateX(0);
}

.sse-notification-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    font-weight: 600;
}

.sse-notification-header.celebration-header {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    position: relative;
    overflow: hidden;
}

.sse-notification-header.celebration-header::before {
    content: '✨';
    position: absolute;
    font-size: 2rem;
    animation: sparkle 3s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes sparkle {
    0%, 100% {
        left: -20px;
        top: -10px;
        transform: rotate(0deg);
    }
    50% {
        left: calc(100% + 20px);
        top: 50%;
        transform: rotate(360deg);
    }
}

.sse-notification-header i.bi-airplane-fill {
    font-size: 1.3rem;
    animation: plane-fly 2s ease-in-out infinite;
}

.sse-notification-header i.bi-trophy-fill.celebration-icon {
    font-size: 1.5rem;
    animation: trophy-bounce 1s ease-in-out infinite;
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

@keyframes trophy-bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.1);
    }
}

@keyframes plane-fly {
    0%, 100% {
        transform: translateY(0) rotate(-5deg);
    }
    50% {
        transform: translateY(-5px) rotate(-5deg);
    }
}

.sse-notification-close {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.sse-notification-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.sse-notification-body {
    padding: 20px;
}

.consultant-celebration {
    display: flex;
    align-items: center;
    gap: 15px;
}

.consultant-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffc107;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    flex-shrink: 0;
    animation: photo-glow 2s ease-in-out infinite;
}

.consultant-photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    flex-shrink: 0;
    border: 3px solid #ffc107;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    animation: photo-glow 2s ease-in-out infinite;
}

@keyframes photo-glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 193, 7, 0.6);
    }
}

.celebration-text {
    flex: 1;
}

.celebration-message {
    font-size: 1.05rem;
    color: #212529;
    margin-bottom: 10px;
    line-height: 1.5;
    text-align: left;
}

.celebration-message strong {
    color: #ff9800;
    font-weight: 700;
}

.celebration-congrats {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffc107;
    text-align: left;
    animation: congrats-pulse 1.5s ease-in-out infinite;
}

@keyframes congrats-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.sse-notification-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 12px;
    line-height: 1.4;
}

.sse-notification-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

.sse-notification-details div {
    display: flex;
    gap: 6px;
}

.sse-notification-details strong {
    color: #495057;
    min-width: 80px;
}

.sse-notification-footer {
    padding: 0 20px 20px 20px;
    display: flex;
    justify-content: flex-end;
}

.sse-notification-footer .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.sse-notification-footer .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    font-weight: 600;
}

.sse-notification-footer .btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

@media (max-width: 576px) {
    .sse-notification-popup {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
    
    .sse-notification-popup.show {
        transform: translateY(0);
    }
    
    .sse-notification-popup {
        transform: translateY(-100px);
    }
}

.sse-notification-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0d6efd 0%, #0dcaf0 100%);
    animation: progress-bar 10s linear;
}

@keyframes progress-bar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}
