/**
 * HotBoys v3 - Toast Notificação Criador Online
 * Estilos responsivos para notificações de videochamada
 */

/* ========================================
   Container de Toasts
   ======================================== */
.hb-toast-container {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 100vh;
    overflow: hidden;
}

/* Desktop: canto inferior direito */
@media (min-width: 769px) {
    .hb-toast-container {
        bottom: 24px;
        right: 24px;
        width: 380px;
        align-items: flex-end;
    }
}

/* Mobile: inferior centralizado, acima do menu */
@media (max-width: 768px) {
    .hb-toast-container {
        bottom: 80px; /* Acima do menu mobile */
        left: 12px;
        right: 12px;
        width: auto;
        align-items: stretch;
    }
}

/* ========================================
   Toast Individual
   ======================================== */
.hb-toast {
    pointer-events: auto;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 30px rgba(226, 56, 47, 0.2);
    overflow: hidden;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    position: relative;
}

.hb-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.hb-toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

/* Mobile: animação vertical */
@media (max-width: 768px) {
    .hb-toast {
        transform: translateY(120%);
    }
    
    .hb-toast.show {
        transform: translateY(0);
    }
    
    .hb-toast.hide {
        transform: translateY(120%);
    }
}

/* Barra de progresso */
.hb-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #E2382F, #FF6A00);
    width: 100%;
    transform-origin: left;
    animation: hb-toast-progress 8s linear forwards;
}

@keyframes hb-toast-progress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* ========================================
   Header do Toast (Badge AO VIVO)
   ======================================== */
.hb-toast-header {
    background: linear-gradient(90deg, #E2382F, #FF6A00);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hb-toast-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hb-toast-badge-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: hb-pulse-dot 1.5s infinite;
}

@keyframes hb-pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hb-toast-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
}

.hb-toast-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   Corpo do Toast
   ======================================== */
.hb-toast-body {
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: center;
}

/* Foto do criador */
.hb-toast-avatar {
    position: relative;
    flex-shrink: 0;
}

.hb-toast-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(226, 56, 47, 0.5);
}

.hb-toast-avatar-online {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #22c55e;
    border-radius: 50%;
    border: 3px solid #1a1a2e;
    animation: hb-pulse-online 2s infinite;
}

@keyframes hb-pulse-online {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

/* Info do criador */
.hb-toast-info {
    flex: 1;
    min-width: 0;
}

.hb-toast-title {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hb-toast-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin: 0 0 8px 0;
}

.hb-toast-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #E2382F, #FF6A00);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hb-toast-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(226, 56, 47, 0.4);
    color: #fff;
    text-decoration: none;
}

.hb-toast-cta i {
    font-size: 14px;
}

/* ========================================
   Toast Empilhado (quando há múltiplos)
   ======================================== */
.hb-toast-container .hb-toast:nth-child(n+4) {
    display: none; /* Máximo 3 visíveis */
}

.hb-toast-container .hb-toast:nth-child(2) {
    transform: translateX(0) scale(0.95);
    opacity: 0.8;
}

.hb-toast-container .hb-toast:nth-child(3) {
    transform: translateX(0) scale(0.9);
    opacity: 0.6;
}

/* ========================================
   Animação de entrada especial
   ======================================== */
.hb-toast.show {
    animation: hb-toast-bounce-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes hb-toast-bounce-in {
    0% {
        transform: translateX(120%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translateX(-10%) scale(1.02);
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    @keyframes hb-toast-bounce-in {
        0% {
            transform: translateY(120%) scale(0.8);
            opacity: 0;
        }
        50% {
            transform: translateY(-10%) scale(1.02);
        }
        100% {
            transform: translateY(0) scale(1);
            opacity: 1;
        }
    }
}

/* ========================================
   Tema escuro alternativo (opcional)
   ======================================== */
.hb-toast.hb-toast-dark {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
}
