/**
 * CLÍNICA CHECKUP - Estilos para Toast Notifications
 * Componente moderno para substituir alert() nativo
 * Versão: 1.0.0
 */

/* Container de Toasts */
.toast-container {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    padding: 20px;
    max-width: 400px;
    width: 100%;
}

/* Posições */
.toast-position-top-start {
    top: 0;
    left: 0;
}

.toast-position-top-center {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.toast-position-top-end {
    top: 0;
    right: 0;
}

.toast-position-bottom-start {
    bottom: 0;
    left: 0;
}

.toast-position-bottom-center {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.toast-position-bottom-end {
    bottom: 0;
    right: 0;
}

/* Toast Individual */
.toast {
    display: flex;
    align-items: flex-start;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    padding: 16px;
    min-width: 300px;
    max-width: 100%;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    border-left: 4px solid;
}

/* Tipos de Toast */
.toast-success {
    border-left-color: #28a745;
    background: #fff;
}

.toast-error {
    border-left-color: #dc3545;
    background: #fff;
}

.toast-warning {
    border-left-color: #ffc107;
    background: #fff;
}

.toast-info {
    border-left-color: #17a2b8;
    background: #fff;
}

/* Ícone do Toast */
.toast-icon {
    flex-shrink: 0;
    margin-right: 12px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-success .toast-icon {
    color: #28a745;
}

.toast-error .toast-icon {
    color: #dc3545;
}

.toast-warning .toast-icon {
    color: #ffc107;
}

.toast-info .toast-icon {
    color: #17a2b8;
}

/* Conteúdo do Toast */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-message {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    word-wrap: break-word;
}

/* Botão de Fechar */
.toast-close {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    margin-left: 12px;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.toast-close:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Animações */
.toast-animate {
    animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Posição top-start e bottom-start - animação da esquerda */
.toast-position-top-start .toast-animate,
.toast-position-bottom-start .toast-animate {
    animation: toastSlideInLeft 0.3s ease-out;
}

@keyframes toastSlideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-position-top-start .toast-hiding,
.toast-position-bottom-start .toast-hiding {
    animation: toastSlideOutLeft 0.3s ease-in forwards;
}

@keyframes toastSlideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

/* Posição top-center e bottom-center - animação de cima/baixo */
.toast-position-top-center .toast-animate,
.toast-position-bottom-center .toast-animate {
    animation: toastFadeIn 0.3s ease-out;
}

@keyframes toastFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast-position-top-center .toast-hiding,
.toast-position-bottom-center .toast-hiding {
    animation: toastFadeOut 0.3s ease-in forwards;
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .toast-container {
        padding: 10px;
        max-width: 100%;
    }

    .toast {
        min-width: auto;
        width: 100%;
        padding: 12px;
    }

    .toast-message {
        font-size: 13px;
    }

    .toast-icon {
        font-size: 18px;
        margin-right: 10px;
    }
}

/* Tema Escuro (se aplicável) */
.dark .toast {
    background: #2d2d2d;
    color: #fff;
}

.dark .toast-message {
    color: #fff;
}

.dark .toast-close {
    color: #ccc;
}

.dark .toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Acessibilidade */
.toast[aria-live="assertive"] {
    /* Garantir que leitores de tela anunciem imediatamente */
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
    .toast-animate,
    .toast-hiding {
        animation: none;
    }
    
    .toast {
        transition: opacity 0.2s ease;
    }
}








