/**
 * SIGRAWEB PREMIUM NOTIFICATIONS
 * Sistema de notificações elegante baseado no design do loading premium
 * Adaptado para notificações compactas no canto inferior direito
 */

/* ============================================
   CONTAINER DE NOTIFICAÇÕES
   ============================================ */

.sigraweb-notifications-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    pointer-events: none;
    max-width: 380px;
    width: calc(100vw - 40px);
}

/* ============================================
   NOTIFICAÇÃO INDIVIDUAL
   ============================================ */

.sigraweb-notification {
    pointer-events: auto;
    margin-bottom: 12px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.sigraweb-notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   CARD DE NOTIFICAÇÃO
   ============================================ */

.sigraweb-notification-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15),
                0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border-left: 4px solid #007AFF;
    transition: all 200ms ease;
}

.sigraweb-notification-card:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18),
                0 6px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* ============================================
   CORES POR TIPO
   ============================================ */

.sigraweb-notification-card.success {
    border-left-color: #34C759;
}

.sigraweb-notification-card.error {
    border-left-color: #FF3B30;
}

.sigraweb-notification-card.warning {
    border-left-color: #FF9500;
}

.sigraweb-notification-card.info {
    border-left-color: #007AFF;
}

/* ============================================
   HEADER DA NOTIFICAÇÃO
   ============================================ */

.sigraweb-notification-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    gap: 10px;
}

/* ============================================
   ÍCONE
   ============================================ */

.sigraweb-notification-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(0, 122, 255, 0.1);
}

.sigraweb-notification-icon i {
    font-size: 14px;
    color: #007AFF;
}

/* Cores dos ícones por tipo */
.sigraweb-notification-card.success .sigraweb-notification-icon {
    background: rgba(52, 199, 89, 0.1);
}

.sigraweb-notification-card.success .sigraweb-notification-icon i {
    color: #34C759;
}

.sigraweb-notification-card.error .sigraweb-notification-icon {
    background: rgba(255, 59, 48, 0.1);
}

.sigraweb-notification-card.error .sigraweb-notification-icon i {
    color: #FF3B30;
}

.sigraweb-notification-card.warning .sigraweb-notification-icon {
    background: rgba(255, 149, 0, 0.1);
}

.sigraweb-notification-card.warning .sigraweb-notification-icon i {
    color: #FF9500;
}

/* ============================================
   TÍTULO
   ============================================ */

.sigraweb-notification-title {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1.4;
    letter-spacing: -0.2px;
    margin: 0;
}

/* ============================================
   BOTÃO DE FECHAR
   ============================================ */

.sigraweb-notification-close {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #86868b;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 150ms ease;
    padding: 0;
}

.sigraweb-notification-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1d1d1f;
}

.sigraweb-notification-close:active {
    background: rgba(0, 0, 0, 0.1);
}

.sigraweb-notification-close i {
    font-size: 12px;
}

/* ============================================
   MENSAGEM
   ============================================ */

.sigraweb-notification-message {
    font-size: 12px;
    color: #515154;
    line-height: 1.5;
    padding: 0 16px 14px 54px; /* 54px = 16px padding + 28px icon + 10px gap */
    margin: 0;
    word-wrap: break-word;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
    .sigraweb-notifications-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        width: auto;
    }

    .sigraweb-notification-card {
        border-radius: 10px;
    }

    .sigraweb-notification-header {
        padding: 12px 14px;
        gap: 8px;
    }

    .sigraweb-notification-icon {
        width: 24px;
        height: 24px;
    }

    .sigraweb-notification-icon i {
        font-size: 12px;
    }

    .sigraweb-notification-title {
        font-size: 12px;
    }

    .sigraweb-notification-message {
        font-size: 11px;
        padding: 0 14px 12px 46px; /* 46px = 14px padding + 24px icon + 8px gap */
    }

    .sigraweb-notification-close {
        width: 20px;
        height: 20px;
    }

    .sigraweb-notification-close i {
        font-size: 11px;
    }
}

/* ============================================
   DARK MODE
   ============================================ */

@media (prefers-color-scheme: dark) {
    .sigraweb-notification-card {
        background: #1c1c1e;
    }

    .sigraweb-notification-title {
        color: #f5f5f7;
    }

    .sigraweb-notification-message {
        color: #d1d1d6;
    }

    .sigraweb-notification-close {
        color: #86868b;
    }

    .sigraweb-notification-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #f5f5f7;
    }

    .sigraweb-notification-close:active {
        background: rgba(255, 255, 255, 0.15);
    }
}

/* ============================================
   ANIMAÇÕES DE ENTRADA/SAÍDA
   ============================================ */

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}
