/* Estilos para toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100; /* REDUCIDO para no interferir con drag & drop */
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    pointer-events: none; /* IMPORTANTE: No bloquea eventos del mouse */
}

.toast {
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.3s ease-out;
    color: white !important;
    font-weight: 500;
    border-left: 4px solid;
    pointer-events: auto; /* Los toasts individuales sí pueden recibir eventos */
}

.toast .material-icons {
    font-size: 20px;
}

.toast.info {
    background: #3498db;
    border-left-color: #2980b9;
}

.toast.success {
    background: #2ecc71;
    border-left-color: #27ae60;
}

.toast.warning {
    background: #f39c12;
    border-left-color: #d35400;
}

.toast.error {
    background: #e74c3c;
    border-left-color: #c0392b;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.fade-out {
    animation: toastSlideOut 0.3s ease-in forwards;
}

/* Estilos para el modal de reemplazo */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
    pointer-events: auto; /* Asegurar que el modal pueda recibir eventos */
}

.modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    animation: modalFadeIn 0.3s ease-out;
    pointer-events: auto; /* El modal debe ser interactivo */
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.replace-app-dialog {
    padding: 24px;
}

.replace-app-dialog h3 {
    margin-top: 0;
    color: #e74c3c;
    font-size: 1.5rem;
}

.existing-app-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    border-left: 4px solid #3498db;
}

.existing-app-info p {
    margin: 8px 0;
}

.dialog-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.dialog-actions .btn {
    flex: 1;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.dialog-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dialog-actions .btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.material-icons.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none !important;
}
