/**
 * QMP Toast - Sistema de Notificações para Quero Meu Presente
 * Estilos CSS (Versão separada)
 * Versão 1.0.0
 */

/* Container de toasts */
.qmp-toast-container {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 100%;
    pointer-events: none;
}

/* Posicionamento dos containers */
.qmp-toast-top-right {
    top: 20px;
    right: 20px;
}

.qmp-toast-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.qmp-toast-top-left {
    top: 20px;
    left: 20px;
}

.qmp-toast-bottom-right {
    bottom: 20px;
    right: 20px;
}

.qmp-toast-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.qmp-toast-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* Toast básico */
.qmp-toast {
    font-family: 'Poppins', sans-serif;
    background-color: white;
    color: #333;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 0;
    min-width: 250px;
    max-width: 350px;
    display: flex;
    align-items: center;
    opacity: 0;
    position: relative;
    pointer-events: auto;
    overflow: hidden;
}

/* Toast de acordo com o tipo */
.qmp-toast.success {
    border-left: 4px solid #00C853;
}

.qmp-toast.error {
    border-left: 4px solid #F44336;
}

.qmp-toast.info {
    border-left: 4px solid #2196F3;
}

.qmp-toast.warning {
    border-left: 4px solid #FF9800;
}

/* Animações */
@keyframes qmp-toast-in-right {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes qmp-toast-in-left {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes qmp-toast-in-center {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes qmp-toast-out-right {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes qmp-toast-out-left {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}

@keyframes qmp-toast-out-center {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-20px); opacity: 0; }
}

/* Loader da barra de progresso */
.qmp-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: rgba(0, 0, 0, 0.2);
    transition: width linear;
}

/* Ícones */
.qmp-toast-icon {
    margin-right: 12px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.qmp-toast.success .qmp-toast-icon {
    background-color: rgba(0, 200, 83, 0.1);
    color: #00C853;
}

.qmp-toast.error .qmp-toast-icon {
    background-color: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

.qmp-toast.info .qmp-toast-icon {
    background-color: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.qmp-toast.warning .qmp-toast-icon {
    background-color: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

/* Texto da mensagem */
.qmp-toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

/* Botão fechar */
.qmp-toast-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #999;
    margin-left: 8px;
    padding: 0;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.qmp-toast-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Animações específicas */
.qmp-toast-fade-in {
    animation: qmp-toast-in-right 0.3s ease forwards;
}

.qmp-toast-fade-out {
    animation: qmp-toast-out-right 0.3s ease forwards;
}

/* Responsividade */
@media (max-width: 480px) {
    .qmp-toast-container.qmp-toast-top-right,
    .qmp-toast-container.qmp-toast-top-left,
    .qmp-toast-container.qmp-toast-bottom-right,
    .qmp-toast-container.qmp-toast-bottom-left {
        left: 16px;
        right: 16px;
    }
    
    .qmp-toast {
        max-width: 100%;
        width: calc(100% - 32px);
    }
}