/**
 * PHONA Notification System
 * Sistema de notificações customizado para substituir alertas do navegador
 */

/* Container de notificações */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    pointer-events: none;
}

@media (max-width: 768px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Notificação individual */
.notification {
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.notification:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Animações */
@keyframes slideInRight {
    from {
        transform: translateX(calc(100% + 40px));
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

    to {
        transform: translateX(calc(100% + 40px));
        opacity: 0;
    }
}

.notification.removing {
    animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Barra de progresso */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    transition: width linear;
}

/* Ícone da notificação */
.notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
}

/* Conteúdo da notificação */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #ffffff;
    line-height: 1.4;
}

.notification-message {
    font-size: 13px;
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* Botão de fechar */
.notification-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s ease;
    padding: 0;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

/* Tipos de notificação */

/* Erro */
.notification.error {
    border-left: 4px solid #ef4444;
}

.notification.error .notification-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.notification.error .notification-progress {
    color: #ef4444;
}

/* Aviso */
.notification.warning {
    border-left: 4px solid #f59e0b;
}

.notification.warning .notification-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.notification.warning .notification-progress {
    color: #f59e0b;
}

/* Sucesso */
.notification.success {
    border-left: 4px solid #10b981;
}

.notification.success .notification-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.notification.success .notification-progress {
    color: #10b981;
}

/* Info */
.notification.info {
    border-left: 4px solid #3b82f6;
}

.notification.info .notification-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.notification.info .notification-progress {
    color: #3b82f6;
}

/* Phona (tema personalizado) */
.notification.phona {
    border-left: 4px solid #c28c66;
}

.notification.phona .notification-icon {
    background: rgba(194, 140, 102, 0.15);
    color: #c28c66;
}

.notification.phona .notification-progress {
    color: #c28c66;
}

/* Estados de validação para inputs */
.input-wrapper.error .input-field,
.select-wrapper.error .select-field {
    border-color: #ef4444 !important;
    animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.input-wrapper.success .input-field,
.select-wrapper.success .select-field {
    border-color: #10b981 !important;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-4px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(4px);
    }
}

/* Ícones SVG inline */
.notification-icon svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}