/* Sistema de Notificações */
.notificacao {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: var(--border-radius, 8px);
    background-color: var(--card-bg, #fff);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    z-index: 1100;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    max-width: min(360px, calc(100vw - 2rem));
    font-weight: 500;
    font-size: 0.92rem;
    line-height: 1.45;
    display: flex;
    align-items: flex-start;
}

.notificacao.visivel {
    opacity: 1;
    transform: translateY(0);
}

/* Tipos de notificação */
.notificacao-sucesso {
    background-color: var(--success-color, #38B87C);
    color: white;
    border-left: 4px solid #008443;
}

.notificacao-erro {
    background-color: var(--error-color, #ff3d3d);
    color: white;
    border-left: 4px solid #cc0000;
}

.notificacao-aviso {
    background-color: #f59e0b;
    color: #1a1a1a;
    border-left: 4px solid #b45309;
}

.notificacao-info {
    background-color: #2196F3;
    color: white;
    border-left: 4px solid #0d47a1;
}

/* Ícones de notificação */
.notificacao::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
    flex-shrink: 0;
    line-height: 1.4;
}

.notificacao-sucesso::before {
    content: '\f00c';
}

.notificacao-erro::before {
    content: '\f071';
}

.notificacao-aviso::before {
    content: '\f06a';
}

.notificacao-info::before {
    content: '\f129';
}

@media (max-width: 480px) {
    .notificacao {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
}

/* Animações */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsividade */
@media (max-width: 576px) {
    .notificacao {
        width: calc(100% - 40px);
        max-width: none;
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
}

/* Acessibilidade */
.notificacao[role="alert"] {
    outline: none;
}

/* Múltiplas notificações */
.notificacao + .notificacao {
    margin-bottom: 10px;
}

/* Container de notificações */
.notificacoes-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
}

.notificacao {
    pointer-events: auto;
}

/* Botão de fechar */
.notificacao .fechar {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    transition: opacity 0.2s ease;
}

.notificacao .fechar:hover {
    opacity: 1;
}

.notificacao .fechar::before {
    content: '\f00d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

/* Barra de progresso */
.notificacao .progresso {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
}

.notificacao .progresso::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    animation: progress 3s linear forwards;
}

@keyframes progress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Estados de Carregamento */
.carregando {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.carregando::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.5rem;
    height: 1.5rem;
    margin: -0.75rem 0 0 -0.75rem;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.notificacao[role="alert"] {
    animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-4px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(4px, 0, 0);
    }
} 